The particles に and へ are used to indicate movement towards a destination. In the case of movement towards a destination, the particles can be used interchangeably.
In Japanese, whether you use 行く or 来る depends on the viewpoint of the speaker. If there is movement towards the speaker, you use 来る and if there is movement away from the speaker, you use 行く. This explains the sentence below, which sounds unintuitive to English speakers.