Avoid busy streets.
One of the biggest mistakes that people make when they start biking is to take the exact same routes they used when they were driving. It's usually better to take the streets with fewer and slower cars. Sure, cyclists have a right to the road, but that's a small consolation when you're dead. Consider how far you can take this strategy: If you learn your routes well, you'll find that in many cities you can travel through neighbourhoods to get to most places, only crossing the busiest streets rather than travelling on them.
Ride as if you were invisible.
Assume that motorists don't know you're there and ride in such a way that they won't hit you even if they don't see you. You're not trying to BE invisible, you're trying to make it irrelevant whether cars see you or not. If you ride in such a way that a car has to see you to take action to avoid hitting you (e.g., by their slowing down or changing lanes), then that means they will definitely hit you if they don't see you! But if you stay out of their way, then you won't get hit even if they didn't notice you were there.
Here's another example: It's a good idea to signal a right turn, but it's a better idea to make your right turn at a time or place where there aren't cars behind you that could hit you while you're stopped and waiting to make that turn. You can hang out in the middle of the street, stopped, with your right arm out, waiting to make your turn, but you're counting on cars behind you to see you and stop. If they don't see you, you're in trouble.
Naturally we don't advocate running red lights, but if you're the kind of person who does, then apply the invisibility principle when deciding on whether to run a particular light: Could any cross traffic possibly hit me if I were invisible? If yes, then absolutely don't do it. Never make a car have to slow down to avoid hitting you (red light or not). Remember, the more you rely on cars to see you to avoid hitting you, the more chances they'll have to actually do so.
Remember, you're not trying to BE invisible, you're just riding with the assumption that cars can't see you. Of course, you certainly WANT them to see you, and you should help them with that. That's why you'll wave to motorists whom you think might be about to pull out in front of you, and why you'll be lit up like a Christmas tree at night (front and rear lights).
There are exceptions to riding as though you were invisible. For example, often you'll need to command a whole lane of traffic instead of riding to the extreme left, for the reasons mentioned in the next section.
Take the whole lane when appropriate.
The Fine Print
I have developed this page to provide what I believe is very good advice to help you avoid getting hit by cars. But of course, nothing is 100% safe, and I can't guarantee you won't get hit by a car, even if you follow all the advice on this page. (Naturally, I believe if you follow this advice you will be much less likely to suffer a collision than if you ignore it.) Ultimately, you are responsible for your own safety.