Summary:

Great People can move about the board like any other units. They are non-combat units, which means that they cannot stack in a tile with other non-combat units (Workers, Settlers), but they can stack with one military unit. If an enemy unit enters a Great Person's tile, that Great Person is automatically destroyed (the enemy doesn't get it.) The exception to this rule is the Great Prophet, which can be captured.