If the game runs ok offline then it's almost certainly your high ping.
When you look at a server you should the ping value there.
The lower the ping the better as this is how many miliseconds it takes for the server to respond.
Choose one with a low ping.
On Quake 4 i choose ones lower than 150 although you could go a little higher(trial and error).
About 45 would be superb but not many off those.