It depends, its good to switch it up every so often so your muscles dont no wtf's going on.
Whatever you feel gives best results.
Dorian Yates used to squat religiously for 6-7 years with good results, but after trying out the smith squats and hack squats he didnt go back to bb squats because he reacted to the machine better.
Also with a machine you focus much more on working that muscle and not worry about stabilzing your body.
I aint saying dont do free wieghts at all, as all of my major movements i primarly use free wieghts.
P.S Although it is good to use free wieghts esp if just starting out.
just my 2c
peace