The demo is free. The demo offers 3 cars and 1 track and while it is unlimited in the ammount of time you can play it you do not get the full features. To buy a licence to access all features you need to pay for it. The price will be depandant on the currect £/$ exchange rate but will cost £24.
Edit: Damn it beaten
Edit 2: Yes you can race online in demo, however the racing can be difficult at times due to people crashing and wrecking your car as they can change name easily. However the racing is generally better on licenced servers.