Iglesia vs. templo

The Spanish language has a rich vocabulary that often includes more than one word to describe similar concepts. Such is the case with 'iglesia' and 'templo', both referring to places of worship but with slight differences.

Iglesia

'Iglesia' refers specifically to Christian houses of worship, comparable to 'church' in English. It's most commonly used in the context of Catholicism, representing buildings where Mass and other Catholic sacraments are celebrated.
Vamos a la iglesia cada domingo para asistir a misa.
(We go to church every Sunday to attend mass.)
La iglesia de nuestro pueblo es muy antigua y hermosa.
(Our village church is very old and beautiful.)

Templo

'Templo' is a more general term for a place of worship and can refer to any religious building, not just Christian ones. So, it could refer to a church, synagogue, mosque, temple, etc.
El templo budista tiene una arquitectura asombrosa.
(The Buddhist temple has amazing architecture.)
Nuestro viaje incluye visitar el famoso templo de la ciudad.
(Our trip includes visiting the famous temple in town.)

Summary

'Iglesia' and 'templo' in Spanish both refer to places of worship but carry different connotations - the former being specifically Christian and the latter being more general.