This one came up recently. So there does seem to be quite a bit of confusion about this one, with various people suggesting various answers. I would suggest the following as the best guide:
a balcony is a railed elevated platform projecting from the wall of a building and usually with a roof or ceiling
a terrace is usually meant as an open, often paved area connected to a building at ground level and serving as an outdoor living area. When a building has a flat roof which can be accessed and used by the residents, this is also referred to as a rooftop terrace.
a loggia is a space within the body of a building but open to the air on one side.