These are all different things but I agree it is very confusing.
The
TRS2006 Sessions And Rules Guide helps to explain it from a usage point of view it but it's not easy reading. The concepts are identical in TRS2004, TC and TS2009 but obviously some details differ.
If the programming aspect interests you then the GameScript API (documentation of functions) comes with TRS2004 in C:\Program Files\Auran\TRS2004\Scripts\docs\index.chm - for TRS2006 I think you have to download it.
Scripts can also be used in assets to make them do things, such as a windmill turning, a level crossing (grade crossing) reacting when a train approaches, or an industry using and producing products. The Content Creators Guide explains that aspect to some extent and also try Andi Smith's write-ups at
http://www.trainzdev.com > TrainzDev Wiki > Scripting > Getting Started In TrainzScript > Tutorials
If TRS2004 scenario writing interests you, try
this step-by-step guide to making a very simple scenario. Or for something probably more appropriate for non-programmers, try Trainz Pro Routes' Scenario Creation System for TRS2004 or TRS2006. The TRS2006 version also works with TS2009 I hear.
HTH, John