に (destination)
to (where you're going)
Place + に + 行く / 来る / 帰る / 乗る / 入る
Sign up free to review this point on a spaced schedule.
With verbs of movement, に marks where you end up: 学校に行きます, "I go to school"; 日本に来ました, "I came to Japan"; うちに帰ります, "I'm going home".
It also marks what you get into or onto: 電車に乗ります, "get on the train"; お風呂に入ります, "take a bath", literally "enter the bath".
へ, the next point, is close in meaning and often interchangeable here. に points at the arrival, へ at the direction. In everyday speech に is more common, and it's the one to reach for when unsure.
What に never marks is the place you're doing something in. That's で.
Examples
毎日、学校に行きます。
I go to school every day.
去年、初めて日本に来ました。
I came to Japan for the first time last year.
六時にうちに帰ります。
I'll be home at six.
駅から電車に乗ります。
I'll get on the train at the station.
寝る前にお風呂に入ります。
I take a bath before bed.