Myocarditis is an inflammation of the heart muscle that can reduce the heart's ability to pump and cause arrhythmias. Common symptoms include chest pain and shortness of breath. Pericarditis is inflammation of the sac surrounding the heart and causes sharp chest pain that gets worse when coughing or breathing deeply. Both conditions are often caused by viruses and can be diagnosed through ECG, imaging tests, and cardiac enzyme levels. Treatment involves managing symptoms, treating any infections, and using medications like NSAIDs or colchicine.