Drive your bike like it's a car.
Don't go driving down the middle of lanes between traffic.
Accidents happen a lot because people treat bikes and cars differently, and often car drivers don't know what a bike is going to do, since they're more maneuverable than cars and can do things you wouldn't expect.