Start with machines if you need to, otherwise, head for the barbell and dumbbell
I believe the best gyms are the ones with a barbell and a full sets of dumbbells as the potential is so great - you can effectively work out your entire body with simply these basic equipments.
Machines does have its place in a gym though: if you are just starting out and trying to figure out the movement patterns for the basic lifts, then the machine are helpful as they have a defined movement patterns that you adhere too.
I find that it also helps if you are in the process of trying to fix tight muscles and using the machine as a substitute for free weight exercises. For example, one of my client has rounded shoulders and during the process of correcting his posture (by stretching the pec and lats and strengthening the rhomboids), we used the leg press machine to work on his legs because he wasn't able to put a bar on his back yet.
Machines are also helpful to distribute the members of the gym around the space so no one is hogging the barbell and the dumbbells at any one time.
Once you are comfortable with using the machine, I would highly recommend switching over to using free weights such as a barbell or dumbbell as this is where most of your gains will come from; it incorporates more muscle groups including your core and glutes so you can give them a workout too!