The debate continues whether free weights or machines are superior for weight training. Naturally both can be used to help build muscular strength, endurance, and flexibility however each also has its benefits and setbacks. Which is right for you truly depends on your goals, environment, and expertise.
Machines:

Machines offer a significant advantage over free weights due to the fact they are safer. If you are new to the weight room the possibility of dropping a leg press machine on yourself is very slim when compared to a free weight such as a dumbbell. Machines are also useful when training without a spotter since there is little to no chance of apparatus injuring he user. With machines the range of motion is completely defined by the mechanics of the machine and deviation from that pathway is not possible. Generally speaking, machines are heavily used by beginners and seniors due the limited possibilities of injuries.
Free Weights:

Numerous studies have shown that free weights require more balance, coordination, and muscular strength when compared to machines. Researchers believe this additional effort allows for larger and faster strength gains to be achieved when compared to exercising with machines. Free weights require a greater skill set to operate which place larger demands on muscles, which ultimately means more gains when compared to machines. Free weights also provide a bonus since the range of motion is selected by the user and not dictated by a machine. This means the user is able to vary exercise positions and make subtle changes as required to increase the effectiveness of each the exercise.
The Bottom Line:
In an ideal world the user should incorporate both free weights as well as machines in to their exercise program. By combining both the user will benefit from both styles / variations of weight training. When lifting free weights always remember to use a spotter if you feel you are close to your maximum, this will ensure you do not injure yourself. If time is of the essence stick with free weights they will get you to your goals much faster than machines alone.