If a vehicle starts fishtailing from side to side, you need to countersteer earlier and faster. Using a steering wheel (or gamepad) is highly recommended.
When cornering with a keyboard, repeatedly tap [action=steer_left] or [action=steer_right] to better control the steering angle and prevent unwanted understeer.
Many vehicles are not suited for spirited driving or racing in stock form. Aftermarket upgrades are available in the Parts Selector [action=parts_selector].
Cars with more weight on the rear wheels can have a tendency to initially understeer with throttle application, and then oversteer suddenly. This is called "snap" oversteer.