What type of squat would strengthen legs the best?

and how do you do it?

They all work slightly different muscles/muscles at different angles/etc. YOU may gain better from a certain style than someone else if you pick one that is suited to your weaknesses.

okay so what are the different ones and what do they help?

Think of a way to hold a heavy object. Think of a way to lower said object towards the ground. There are hundreds of ways to squat. In your case I would stick with back squats and front squats