Recent observations of gravitational waves from binary mergers of black holes or neutron stars and the rapid development of ultra-intense lasers lead strong field physics to a frontier of new physics in the 21st century. Strong gravity phenomena are most precisely described by general relativity, and lasers that are described by another most precisely tested quantum electrodynamics (QED) can be focused into a tiny area in a short period through the chirped pulse amplification and generate extremely high intensity electromagnetic (EM) fields beyond the conventional methods. It is physically interesting to study QED phenomena in curved spacetimes, in which both strong gravitational and electromagnetic fields play important roles. There are many sources for strong gravitational and electromagnetic fields in the sky or universe, such highly magnetized neutron stars, magnetized black holes, and the early universe. We review quantum field theoretical frameworks for QED both in the Minkowski spacetime and curved spacetimes, in particular, charged black holes and the early universe, and discuss the QED physics in strong EM fields, such as the vacuum polarization and Schwinger pair production and their implications to astrophysics and cosmology.