There is a 'Test' mode that allows you to load up a car and track of your choice, with no other drivers on track and no effect on your stats. It operates like an offline mode (to the extent that you can continue driving if you lose your connection), but you have to be online to load the track in the first place to complete a verification check. In all the other modes - practice, time trial, etc, you need an active, stable connection otherwise you automatically get kicked, and you can expect to be on track with other drivers. The practice mode with other drivers also doesn't affect your safety rating, but it does save your lap times, and you can be protested for mucking about (pretty rare as it's normal to see people pushing too hard in practice, crashing all over the place - you'd have to be acting like a real tool, driving the wrong way, deliberately wrecking everyone, etc).
A useful feature is ghost racing, where you can 'spectate' a live race from within the server (allowing you to watch any driver from any camera angle) and you have the option to join in as a ghost car, where the drivers will not see you and drive through you. This can help you get comfortable being near other cars, to practice following somebody's line, and to test your graphics performance when surrounded by cars. It can give you a false sense of security however, as the lack of contact and awareness from the other drivers is not the same as racing for real, so I wouldn't rely on it too much for practice.