When it comes to strength training there are a multitude of options. There are thousands of machines, dozens of different kinds of free weights, or you can use body weight exercises. Figuring out which one is best for you and your needs can be difficult. On one hand machines can be great when you’re fist starting because it is easier to keep good form. On the other hand, free weights use more muscles and can give you a more complete workout. What you choose is ultimately your decision. I suggest talking with a trainer about your goals to find what will work best for your goals.
When your trying to strengthen the long head of the bicep femoris a machine can help zero in on that part of the muscle. This means if you are recovering from injury, prehabing (exercising to prevent injury) or if you are at a point where such specific muscle isolation is necessary, certain machines will help you the most. Targeting a specific muscle or a specific part of a muscle can be tricky with free weights, but it can be done.
If you visit the gym a 2-3 times a week, odds are you want to maximize your time in the gym by hitting as many muscles as possible. This is where free weights shine. On a tricep machine you only strengthen the tricep but with free weights you are also strengthening your abdominal muscles as they are engaged to keep you balanced as you curl. If your standing your legs are also engaged. Free weights also allow for a greater range of motion. Some caution is to be used though, as it is easier to cause injury if your range of motion is too great and wonders into unstable territory. For instance, when doing a front arm raise lifting the weight above shoulder height can stress the shoulder joint and increase the likelihood of a strain. If you are unsure what ranges are safe a session with a personal trainer can be beneficial. Ask to go through some basic exercises you wish to do on your own. Pay attention to the form they have you use and replicate it in your own workouts. There’s reason there are so many mirrors in a gym. Use them to keep your form, stay safe, and get results.
Many gyms have their machines set up so that if you do a circuit you hit every muscle, a machine that works your chest will be next to a machine that works your back. Just asking for a tour of the machines (a service that is usually free) can be hugely beneficial. Ask around, try stuff out, and do what works for you.
In the end the best workout is the one you enjoy and you stick to. If you find squats boring but love the leg press machine, use the leg press machine. You can incorporate balance in another exercise.