You've probably heard plenty from friends and family members about how dangerous it is to ride a motorcycle. You still ride. You just want to know how to do it safely.
There are a lot of things to keep in mind if this is your goal. You always want to obey the traffic laws. You should wear a helmet. The brighter the color of your bike and/or your jacket, the better. You never want to overrun your headlights at night.
These are all helpful tips, and you should keep them in mind. However, here is perhaps the top tip for any motorcyclist: Assume no one can see you.
Do this everywhere. When you're driving next to another car on the interstate, assume they have no idea you're there. When you see a car stop and wait to turn left on the road ahead, assume they don't know you're coming. If you're nearing an intersection and you have the right of way, assume that any drivers stopped at that intersection have not spotted you.
If you do this, it makes it easier to react when that driver turns left in front of you or pulls out into your lane or merges into the side of your bike. You want to assume the worst is going to happen so that you're ready to react and protect yourself.
That said, even assuming no one sees you can't prevent all accidents. If you suffer from some serious injuries, you must know if you have a right to financial compensation for your medical bills and related costs.