I've been working out now for a long time and I've had the chance to help a lot of guys who want to build muscle. Here are various pieces of advice I would give anyone including mistakes that you should avoid in the gym.
I would first advice a newbie in the gym to always use the correct form when doing an exercise. It is not unusual to see atrocious form if you just observe the ways some people work out. I've seen guys jump on the leg press, for example, and load it up beyond what they could even come close to doing with a decent range of motion. They will proceed to do "repetitions" in which they only lower the weight about three or four inches. They would be much better off using less weight and going lower with it. I've also observed guys slinging the weight around in order to impress their buddies. Improper form will cause you to injure yourself and will keep you from reaching your potential.
I would also encourage you to be patient and consistent. The gym is full of people in January, and then they suddenly disappear a few weeks later. What happened? Maybe they were expecting to see huge changes in just a few days of training. Well, that's just not going to happen. You can see pretty rapid results in strength if you will train the right way. But building a big, powerful body is not an overnight thing. You will have to be consistent for several weeks (maybe months) in order to begin to reach your goals.
Another important tip is to eat right. Your body cannot achieve hypertrophy (muscle growth) without the proper raw materials. For starters you need to be getting plenty of high quality protein--probably about a gram of it per pound of body weight. You should also be getting enough carbohydrates to fuel your workouts and to keep you in a positive calorie balance.
You may wonder what supplements to take. This isn't as important as some make it out to be, but creatine monohydrate is probably the most important/useful one. You may also want to take a whey protein supplement--mix it with milk for extra calories and protein. Top this off with a multivitamin and fish oil and you should be good to go.
Needless to say, I can't cover everything about building muscle in this one short post. You may want to look into a program like MI40x (http://MI40xReview.net) if you want a more in-depth guide to building mass.
Just a guy trying to build some brawn.