[noun (place)] + に + [verb of motion] [noun (place)] + へ + [verb of motion]
に and へ after a place both mark where a movement goes: "to". The verb is one of going, coming or returning, and with these verbs you can use either particle. As a particle, へ is read "e".
へ leans towards the direction you set off in, に towards the place you arrive at. That makes へ the natural choice with a bare direction, and に the usual one with a verb of arriving such as つく着く or とどく届く.
へ only marks where something is headed. Every other job of に – a time, the place where something is, the person you meet, the seat you sit on, the vehicle you get on – takes に alone.
The purpose in あそびにいく遊びに行く, "go to have fun", is also に only.
Before の it goes the other way, and only へ is possible: はは母へのてがみ手紙 is "a letter to my mother".