sounds like your back wheel is coming out of alignment because the wheel isn't bolted or quick-released to the frame tight enough. Whenever you put a lot of force on the chain (e.g. when pedaling uphill) it's pulling the chain-side of your wheel forward.
Just to be on the safe side, I'd fix this before riding it anywhere. Chances are your weight and gravity will keep the wheel from moving enough to give you a major problem, but you do risk the outside chance your wheel could fall off while riding.
Fixing it is simple:
If the wheels have bolts just give them a couple turns of the ol' wrench.
If it's quick release just loosen the lever (aka the "cam,") give the nut on the opposite side a twist or two clockwise, and then flip the lever back to the closed position. If it's tight enough there should be some resistance when you do close the lever, but if you're straining muscles or bruising your hand to close it you've overtightened and need to loosen the bolt up a bit. If you're not sure what I'm talking about there are good pictures here: http://en.wikipedia.org/wiki/Quick_release_skewer
As for getting comfortable riding, it comes with time. Be cautious and considerate of cars and 95% of drivers will be nice back. The other 5% are going to be jerks no matter how great your city-riding skills are.
Also, don't get intimidated, if you're panicking in traffic, you're as likely to make a bad decision as you are if you're simply inattentive.
I'd suggest identifying the main routes you plan to bike and then riding them once or twice with a more experienced cyclist. That will give you a sense of when to ride to the right vs taking the entire lane, how to handle busy intersections, what streets and monster potholes to avoid, etc.