Free weights (dumbbells and barbells) and machines both have their place in the gym. Let us examine some of the pros and cons of each...
The biggest benefit of free weights is the requirement of stability. When using free weights, your body's stabilizer muscles that surround the joints are required to perform. This is especially true when using dumbbells, because now each arm's stabilizer muscles have to work independently. For example, if you are doing a seated overhead dumbbell shoulder press, or a lying dumbbell chest press, each shoulder, pectoral muscle, and shoulder/elbow stabilizers have to do the work. This unilateral work will ensure that you minimize strength and size imbalances between each side of the body, top to bottom, and front to back.
The drawback to free weights is safety. If you are a beginner, or unsure of proper form and usage, you have a greater risk of injury with free weights, especially if you are not using a spotter.
Machines offer a variety of exercises for every body part. There are different types of machines, i.e. cable resistance, plate loading (offers more of a free weight feel), cable resistance with swivels (to encourage extra stability work), etc. Machines are great for beginners, because they move through a fixed range of motion, which minimizes the risk for injury. Cable resistance is also beneficial in offering a different feel than free weights, which rely solely on the weight and gravity. There are also many machines that give you movement options that simply cannot be mimicked with free weights. Machines do not require a spotter, which is another benefit for a beginner. The downside to machines is that they do not recruit as much muscle as free weights, and therefore should not be used solely (without free weights).
Conclusion: I would say that my personal regimen is made up of around 70% free weights and 30% machine work. Both have their rightful place in a workout regimen, and I feel that everyone should try and implement both in their workouts. However, I feel that in the long run, free weight training will always be KING. Mass building exercises such as squats, dead lifts, pull ups, rows (barbell/dumbbell), military press, dumbbell shoulder press, chest press, etc. all utilize free weights. The best way to ensure that you are getting a well rounded workout attacking the muscles from all angles/positions is through using both free weights and machines. But I suggest that free weights should always remain the foundation of your routine! Train hard!