The most stable and secure racks are the ones which mount directly to the vehicle at hard points, such as a trailer hitch (for rear racks) or door frames (for roof racks).
Racks which use fabric straps attached to hooks can move around a bit more, and if they are not very well made, they can loosen over time. This problem is made worse by the fact that most cheap racks use fabric straps.
Of course the best is if you can somehow mount your bike inside your vehicle. If you drive a small car this won't work, and even some rack mounts may not be viable if your car has only two doors.
Personally I prefer roof racks, and have driven up to four bicycles at a time on multiple cars using them for hundreds of kilometers without stopping, at speeds up to 125 kph. The main problems tend to be (1) the removed front wheels spinning in their separate mounts (easily corrected by small straps which some racks now come with), (2) reduced fuel efficiency and increased wind noise, and (3) the possibility that you will wreck your bikes by driving into a garage or other low-clearance area. All of those problems are reduced on rear-mounted racks.
If your car has a trailer hitch, consider a rack that mounts in it. These can be very secure, low-noise, and easy to install and remove (both rack and bikes). The main downside is that accessing your trunk becomes less convenient (but still not as bad as with rear racks which attach using straps).