Controlling a fan/cooler

i have two of then, one with 2 wires (black and red) and the other one with 3 wires (b,r, and yellow). i guess the last one is controlable. All i wanna do is to find a way to turn it on and of. maybe change the speed, but that's not my primary objective. just wanna know how to do this