You have to enable the console and then type in the command. A simple search of this forum will give back several threads answering this same question.
------------------
Quit crying and just die already!
A tip:
After watching your fps for a while figure an average (or about +15 from the worst)number your getting and set it for the max. This makes things run smoother.
In the console type:
com_maxfps *
*=the number you choose