Racing Game Help

Hi you guys,
I need to know how to make the computer’s car move (AI).
I don’t know what to do so could you guys please help me ?
I also need to know how to make it so that after the user’s car reaches the end, it’ll stop everything and display a winning text ?