What could be wrong if a 96 Mazda Protege heats up while parked or going slow but once brought up to a higher speed it becomes cold?

Check your coolant it may be low Rad may need to be flushed or changed

Just happened to with my 1998 Protege - it's the thermostat! Usually jammed or actually broken in the open position. Follow the upper radiator hose - the housing is just under the distributor cap - ay least it is in the 1998. Good luck,