Exercises can typically be done 2 different ways... by using machines or by using free weights. Machines are... well... machines. Free weights usually refer to dumbbells and barbells. While both can be effective, free weights are better for the purpose of increasing muscle and strength. Here's why...
Machines are designed in such a way that they do part of the work for you. They keep the weight stable. The machine puts everything in a constant stable position that allows you to only have to move the weight from point A to point B. Free weights on the other hand are just that... free weights. They are weights that aren't being held in place by anything except, well, you. Free weight exercises require you to not only move the weight from point A to point B, but to also keep the weight stable throughout the entire movement. Doing so requires the use of additional stabilizer muscles which would not be used had you done the exercise on a machine.
Again, both are effective and can be used in your workout routine. Is one better than the other for gaining muscle? Yes... free weights.
Isolation And Compound Exercises
There are generally 2 types of exercises, isolation and compound. An isolation exercise is an exercise that isolates one muscle to perform the movement. Some examples are bicep curls, leg extensions, lateral raises, and tricep pressdowns.
A compound exercise on the other hand recruits the use of additional muscles to perform the movement. Some examples include squats, the bench press, deadlifts, pull ups, dips, and rows.
While both types of exercises are effective and should be used in your workout routine, compound exercises are more effective when it comes to building muscle and increasing strength.
Always use proper form. I know, it seems stupid that I'd have to say that, but I do. I think everyone on the planet is fully aware that proper form is not only important for the purpose of increasing muscle and getting the most out of each exercise, but it's also obviously important for safety. We all know this, right? However, despite knowing this I still see tons of people in my gym using terrible form for the sole purpose of lifting more weight.
By "more weight" I mean more weight than they can handle with proper form. They think the key to increasing muscle and strength is lifting heavy weight. They are 100% right as long as they are lifting that weight and doing that exercise with the proper form. They aren't. Instead they are NOT going through the full range of motion and are therefore NOT getting the most (or sometimes anything) out of the exercise.
Not to mention, they are also putting themselves in a position to get injured. This is bad. Ignore your ego. Ignore what weight everyone else is lifting. Ignore everyone and everything. Worry only about yourself and only use weight that will allow you to perform an exercise with proper form.