What causes a 1997 Subaru legacy to over heat?

You could be low on coolant, a stuck thermostat, engine fan not coming on for starters. If still overheats, I would recommend taking it to a Subaru dealer.