CPU speeds on those systems are controlled by jumpers on the motherboard. Same with voltage, although voltage settings probably only give you two choices: Pentium Classic or Pentium MMX.
Compaq usually prints the jumper settings for CPU speed on the inside of the cover/case. It's NOT a good idea to change voltage for the Pentium class CPUs though. They are not subject to transient voltage specifications like the P6 line (PPro, PII, PIII, Celeron).