Basically, in a racing game theres 3 things racers want to do:
o Get to the next checkpoint.
o Stay on track.
o Dont crash into other cars. (Unless they are crazy!)
An example would be (Pseudo-Code)
Move Object Car 2
If Distance(Between Car and Road) < 2 then Move away()
If Distance(Between 2 Cars) < 2 then Move away()
After you make those, you need some randomization to dumb the computer down since no racer is perfect and you wouldnt have a game then!
If RND(100)=1 : ` 1% Chance each loop
Move away
Endif
"All programmers are playwrites and all computers are lousy actors" -Anon