Hey, a train just went by!
D: Hey, a train just went by!
C: How do you know daddy?
D: Because its tracks are still here!
This is apparently a "dad" joke. In the US, "dad" jokes are jokes that are based off of lame puns. Most jokes in this blog would probably qualify as "dad" jokes, however this is the first one that was specifically labeled as such.
The humor in this joke is based on the pun in the punchline. The word tracks can mean a thing that trains drive on, and also marks or imprints that things leave when they move around. If an animal were to go by and leave tracks, one might say that it had just gone by if they saw the tracks. The father is, then, pretending that the train tracks were left by the train.