There are three important things that are key to making your way successfully and comfortably on public roads.
Be VisibleTo ride safely, you need to be visible to cars. This means wearing bright colors, including day-glo or reflective gear, particularly in the early morning or at dusk. Lights are important too, both headlights on the front of your bike and blinking red lights in the back. Not only is it the law in most places, it is the best money you can spend to ensure your safety. Related article: See and Be Seen - a Guide to Lights on Your Bike
If you are feeling particularly flamboyant, you might even consider flying an orange flag or windsock like you can see on a granny trike going down the beach.
Also, for maximum visibility, you must ride where cars expect to see other traffic. That means always riding with traffic (on the right side of the road in the U.S. and most of the world outside of the U.K.) and not against it. One of the most frequent causes of accidents is wrong-way cyclists being struck by cars who do not anticipate these kamikazes on bikes coming towards them at a relatively high rate of speed from the wrong direction, particularly when the car is turning from a side street onto a more major roadway.
Be PredictableA common mistake that beginning cyclists make is feeling that they are not entitled to be on the road at all. This thinking is dangerous because it causes cyclists to cower in the presence of cars and act in ways that are in fact contrary to their safety.
An example: imagine riding on a two lane road with light to medium traffic and no shoulder. A beginning cyclist might feel they need to hug the edge of the street while riding, staying as close to the white line as possible. This causes problems because it encourages cars to try to squeeze past, passing when it is not safe. It leaves no room for the person on a bike to maneuver in the event of glass, sewer grates, debris, snapping dogs, politicians, etc., that might appear suddenly on the side of the road.
The better way to ride in this situation is to behave like a car, riding in a straight line in the lane where the car’s right wheel would go. This makes you more visible, and allows you room to move when necessary, plus does not allow cars to pass when it is unsafe.
What makes this difficult for most beginning cyclists is the common fear of being struck from behind. Fortunately, this is among the rarest type of bike/auto collisions. If motorists can see and avoid a traffic cone or highway sign planted in the street, certainly they can safely observe and move around a cyclist properly positioned in the lane.
The risk of accidents at the most common location – intersections – again can be alleviated most effectively if you ride “like a car.” This means no weaving through cars or riding erratically. Rather, focus on obeying traffic lights, signaling turns and being visible to drivers both in your dress and in your presence on the street.