Riding the trains is part of the fun of traveling to Japan! There are two popular sites:
Both sites allow you to enter information in English and are free to use, and both have iPhone and Android apps. To use either system, just choose your place of departure and destination, your approximate times and date, and click search. Both will provide a list of possible options including the train line, number if applicable, transfer information if a transfer is required, etc. If you are using international data, you can use it while on the train, but if you're using WiFi in your hotel or planning before you leave, it can still be really helpful. Trains in Japan run on fixed schedules and routes don't change, so even if you look up the route in advance, it won't change!