What is the difference between train and subway in Japan?

What is the difference between train and subway?

[toc]
Rate article
Tourist guide