Just don't let your ego take over your workouts. If you feel your form going wrong, stop the set and finish, or decrease the weight for th next one. Technique is everything, especially at the start. Any bad habbits you 'learn' now will carry on as you start building strength and that's when your ego takes over and that's when pain happens. The beginner stage is mostly about learning the movements - you don't need to kill yourself to get stronger, especially at this stage.
Also, it's very unlikely that you'll be lifting and one day, BANG, a joint just 'goes'. Most of the time the pain starts off just a little niggle, then is ignored for a while, then it gets worse until it's a real problem. If you just listen to your body/use common sense, any problems will be caught early enough to stop it becoming a real problem. It seems simple, but one of the hardest things to do is 'back off' when your training, even in the presence of pain. I'm a prime example. Well, I was.
I also go by the philosophy of 'use it or lose it'. If you do something, you risk getting hurt. If you do nothing, you risk getting hurt. Not now but in a few years. Inactivity in my view is one of the biggest problems people have these days. Atleast if your doing something, you can get to know your body and get stronger and healthier and, if any problems arise, you can just deal with it.
Any lift that you fear or hate is generally the lift you should be doing the most. It's just the irony of training. Lastly, in a typical commercial/mainstream gym, the advice is normally pretty poor. A good rule is to do the opposite of what you see everyone else doing. In a commercial gym, I reckon maybe 5% of people actually mae progress consistently.