The main LEGO train systems are all roughly compatible. They all use a 6 stud gauge, so with a bit of fiddling, you can use all of the systems together. If you want to be most compatible with the current track offerings, you're better off with 9V and RC/PF track. This question discusses the specific compatibility issues in more detail.
There are several other train systems that have been used that are not compatible (DUPLO trains, 4 guage rails, etc), but I'll just cover the common 6 gauge systems here.
The different types of train track can be divided into a few main eras.
Blue Era (1966 - 1980)
A track section consisted of 2 rails connected by regular 2x8 plates. The rails themselves were blue.
Trains could be either pushed by hand along the track, powered via 3 batteries (4.5V system), or powered via a third conducting rail added to the center of the track (12V system). Here are what the conducting rails for the 12V system look like:
Some people still prefer the 12V system because it included more remote controlled components than the later 9V or RC/PF systems. With later systems, the only thing that is easily remote controlled is the train itself, whereas the 12V system included remote controlled points, light, and decouplers.
Each era included straight track, curved track, switches, and cross track.
Gray Era (1980 - 1991)
These rails are generally the same as the blue rails aside from the new gray color.
The sleepers were moved closer together (3 per section rather than 2), and they were changed to a specialized part to improve the strength of the connection. Here's what the sleepers look like:
The trains of this era were still either powered by 4.5V batteries or the 12V conducting rails.
9V Era (1991 - 2006)
The 9V era completely changed the track components, and did away with the old 4.5V and 12V voltages. Rails sections were a single piece, and they were all conducting.
The 9v system included straight, curved, switch, and cross track.
RC / Power Functions / Powered Up Era (2007-)
In 2006, LEGO switched back to non-conducting rails with roughly the same mold as the 9V track. Trains are now all battery-powered under either the RC or currently the Power Functions and Powered UP systems.
This era included the first and only crossover switch (7996) :
It also introduced flexible track:
Switches are also available, but a cross track has not yet been released for PF track.