Is electromagnetism caused by curved spacetime? They talk about gravity being due to the curvature of spacetime. Does this also apply to electromagnetism, if so why and if not what's the difference?
 A: The short answer is no. It's possible to have a theory of gravity with a curved spacetime without electromagnetism, and it's possible to have electromagnetism on a flat spacetime without gravity. Electromagnetism is simply associated with a different field than the gravitational field.
However, there are ways in which you can unify electromagnetism and gravity, at least mathematically -- it's not clear how physically relevant this is, so you should be careful with overinterpreting this part. I also apologize for the jargon-y language, but it's difficult to avoid without having this answer explode in length.
First, electromagnetism can be formulated as the curvature of a kind of geometric object; not spacetime, but a vector bundle. Loosely speaking, this is a generalization of the idea of a field, where every point in spacetime has an associated vector. The scalar and vector potentials of electromagnetism form a connection on the vector bundle, and the electric and magnetic fields are components of the curvature form for this bundle.
Second, if you allow for extra dimensions, then there's another sense in which electromagnetism can be thought of as related to curvature. Let's consider Kaluza-Klein theory, in which you imagine we have three large spatial dimension, one large time dimension, and one "wrapped up" and small extra dimension we can't directly see. Then, working through the math, the electromagnetic field appears as part of the spacetime curvature in the fifth, extra dimension. One major problem with this model, however, is that it also predicts an additional force mediated by a massless scalar field. This force has never been observed. So more modern theories that use extra dimensions need to be more complicated to avoid this unwanted extra force.
