What's the main difference between a "church" and a "monastery?"

Native speaker’s answer
Rebecca
A church is a place of worship, usually open to the public, where religious events and ceremonies are held. A monastery is a place where monks live and work that usually includes a place of worship. Monasteries also include living quarters, workshops, sometimes schools and/or farms, disciplinary facilities, offices, etc. Monasteries can be closed or open to the public but are usually more separate from the public than churches. Monasteries are most often located away from public communities like towns or cities while churches are most often within such communities. Ex: Everyone in our town goes to church on Sunday. Ex: The oldest monk at the monastery was born there and has never been outside it.