Does lifting to failure mean when you can't do a set with good form, or you can't lift at all? Also, what does "good form" mean? Let's say for bench press - if may arms shake and move sideways, but it gets up, does that "count"?
Lifting to failure means different things to different people at different times.
Bodybuilders and scientists use the phrase to mean "momentary muscle failure", that is, you have to actually try and fail, because that's what's maximally useful for stimulating growth.
Powerlifters and other physical culturists often use "to failure" to mean "as many as you can with good form" or "as many as you can, but leave one 'in the tank'". This is sometimes rephrased as "failure minus one", because it isn't true failure. When I make a lifting program and tell myself, "three sets of pull-ups to failure", this is what I mean. In each set I stop when the next one would be iffy, or would require form breakdown.
Good form means lots of things too. If you're shaking all over the place, that's not good form, but it's also not necessarily problematic form. Sometimes "good form" means shaking is OK, and only excludes breaches of form that affect safety.
You have to decide yourself what you mean with these phrases. If someone else is using them with you, you have to guess or ask which version they mean.
Failure generally means being unable to lift the weight at all.
As for good form, each exercise has a safe way to be performed. If you are performing an exercise and you achieve the end result of completing the lift, but in doing so put yourself in harms way, you have broken form.
A good example of this is the bicep curl. The goal is to get the weight up by flexing the elbow. In many cases when the lifter is tired, or lifting a weight that is simply too heavy, he may bend back in an attempt to aide his biceps in lifting the weight. This hyper-extension of the back can lead to a severe back injury, so ultimately that is a case of broken form.
A general rule of thumb: If the exercise is hurting you in areas that are not the designated area you are breaking from. Muscle aches are ok, but joint pain is always a red flag.
Good form is a phrase most commonly used to describe the optimal mechanical functions of the body to perform a lift by maximizing muscular efficiency targeted by a particular exercise and minimizing if not eliminating the potential for injury.
Using your bench press for example, which primarily hits the outer chest first and the triceps secondarily, would be completely disastrous for example if your elbows were too flared out, taking much of your chest fibers out of the lift and bringing in your shoulders, creating the potential for severe injury. That is just one aspect of maintaining good form on a bench though.