A lot can be said about this, that is why it is a good idea to just google it. But to give you a general idea:
"a" is used before singular countable nouns, not preceded by "the" or a possessive pronoun.
"the" is used when the listener knows what the speaker is referring to, when the noun is defined. That is why it is called a "definite article".
A noun is defined when:
- there is only one (the sun, the moon). I would include superlatives here because only one can be the most of something (the best singer, the richest person)
- there is only one in that place, for example you will say: "Open the window!" when there is only one window in the room.
- it has already been mentioned before (e.g. I saw a man. The man was wearing a blue shirt.)
- there is information which defines it (e.g. "The woman is here." makes you ask "Which woman?" but if you say "The woman who called you earlier is here.", it is clear.
In your example, "I am seeing a train" is a general statement. There is a train and you see it. "I am seeing the train" means that you see a train you were expecting, or one that you had been talking about before. For example, if you are waiting to meet someone at the station and their train is arriving, you see "the train", the one that your friend is in.