You could get yourself started by reading this doc article: Scripting
The language used is AngelScript so you might need to read about the specifics of that language.
You could also crack in the code of the AI that is used in F1 Test Track once you understand the language enough.