The debate between free weights and machines has been going on for decades. Die hard gym rats will usually claim that free weights are the only things worth using. On the other hand, many beginners are only confident enough to use the machines. Each side has their pros and cons and realistically, you should be using a mix of the two.
As you can imagine, free weights have been around far longer than machines. In fact, resistance training like this can be found in historical texts as long as 5,000 years ago. Obviously back then they did not have the technological capabilities of creating a leg extension, but that is besides the point. The fact that its history stretches back so far and is still used today says something about its effectiveness.
However, machines are not something that should be ignored. First seen in the late 1700s, they have come a long way. There is a reason why most gyms have rows and rows of them. Weight machines are extremely user friendly and can be added into your workout to help focus on smaller muscle groups. They have their limitations, but in many cases, these limitations can work to their benefit in other aspects.
Balance - Winner: Free Weights
I'm not talking about standing on one foot without falling over, I'm referring to the goal of obtaining bilateral symmetry. For practical and aesthetic purposes, you often don't want one side of your body to be much larger than the other; that is unless you are a pro arm wrestler. Using free weights, and especially dumbbells, makes sure that each side of your body is required to complete the same amount of work, therefore moving the same force over the same amount of distance.
Constant Tension - Winner: Machines
While the pulley system of machines can make the physical weight feel lighter, they also have their upsides. By keeping the weights moving strictly on a vertical plane, there is constant tension throughout the movement. The problem with free weights is that movements can have less resistance at certain points depending on the direction the weight is moving. For example, a barbell curl has the most resistance when your elbows are at 90 degrees but is significantly less towards the top of the lift because you are moving the bar in more of a lateral direction. On the other hand, the weight (in the stack) is only moved vertically when using a curl machine, even at the top of the movement.
Safety - Winner: Machines
Machines are often the go to for beginners because they are extremely easy to use and sometimes even have instructions included on them. Free weight exercises can include complex techniques that can become dangerous if done improperly. Additionally, machines do not require a spotter in any circumstance, the weights can safely be dropped at any point without risk of injuring yourself. This doesn't mean that free weights are dangerous, just that it is important to use proper form and not to lift with your ego.
Strength - Winner: Free Weights
If strength is what you are after, you have to be incorporating free weights into your routine. The majority of machines found in gyms are based on a pulley system which are literally simple machines used in order to make a weight easier to move. Free weights recruit more muscle fibers per movement thus resulting in better hypertrophy. Additionally, because exercises using free weights are largely compound, they are more efficient at burning fat and changing your body composition. And of course, machines are obviously limited in the amount of weight you can use while most bars have enough space to throw on close to 1000 pounds.
Versatility - Winner: Free Weights
Free weights are by far more beneficial for functional strength. Unlike machines which follow a predetermined path, free weights must be controlled at all positions. This allows for you to complete complex lifts recruiting more muscle groups which translates to more natural strength. There is a neurological input for weight training and the movements seen using barbells and dumbbells are much more applicable to real life events. On top of that, this also means that a machine can only be used for one movement. A dumbbell or barbell however, can be used for myriad movements. If the gym is crowded, it can be a more efficient use of your time using free weights so that you don't have to wait for each machine to become available.
Range of Motion - Winner: Machines
This plays in a little with the safety category. In reality, you could get more range of motion with free weights because they are not attached to anything, however, machines can actually provide more benefit. They key here is QUALITY range of motion. Using the predetermined path, you can slowly and safely overextend (with reasonable weight of course) at the beginning and end of the movements. This allows for better overall muscle development. For example, doing dumbbell cable flies can be dangerous for your shoulders when at the bottom of the movement and your joint is fully extended. If using a machine, the constant tension means that you can use a lower weight and still get the same work in thus allowing for you to comfortably stretch your range of motion.
Isolation - Winner: Machines
Most free weight exercises are compound movements, whether you mean for them to be or not. While that is by no means a bad thing, it can make targeting a single muscle difficult. With machines, most of the movements are focused around a single plane or a specific joint. This can be good for working on imbalances without letting other neighboring muscle groups compensate. This is one reason why machines are often used for rehab.
Machines and free weights each have their advantages and disadvantages. Doing one can benefit the other and vice versa. If you're a beginner it's completely fine for you to be starting with only machines. They are safer and can build up some muscle as well as confidence so that you can eventually tackle some of the more complex compound lifts seen with free weights. On the other hand, even if you have been weightlifting for years, don't completely avoid the machine section. I have always favored free weights a bit as I grew up in a powerlifting household, however, as I got older I noticed more and more imbalances that had formed. This is where machines shine because they can help target very specific muscle groups. Whatever your plan is, make sure to use appropriate weight, otherwise you won't be able to reap the benefits of either technique.