Why are my breaks locking up?

I went to auto shop today and got new brake pads and rotors installed. I went driving and every so often my brakes would lock up as if I was breaking on ice. Does anyone know what could be wrong?

I drive a RWD 06 Ford Ranger if that matters.

You've never had your water-logged brake fluid changed have you? It's full of rust and corrosion which freezes the pistons on the brake calipers.