Here I am telling you the simple steps by following this you can get the train information:
Goto the railway website enquiry.indianrail

Here you can see many tabs like 'Spot Your Train', 'Live Station', 'Train Between Stations', and many more.
If you know the Train No then enter your train no under the 'Spot Your Train' tab, after entering the train no, all the station names with the train arrival/departure/distance info will be displayed.

If you want to get the information of all the trains who has been departured within 2,3 or more hours ago at the specific station, then enter the station name under the 'Live Station' tab like this:

After entering the station name click on Go button and after a result with the train list will be displayed. In this list the trains names are displaying those are departed in past 2 hours:

If you want to get the train information between two stations then select the 'Train Between Stations' tab and enter both the satiation names after that you will get a list of running trains on that route.

In enquiry.indianrail website you can get many more train information like Cancelled Train, Rescheduled Trains, Diverted Trains and so on.
I hope the information is sufficient for your question.