yep, but specifically ping is the time it takes for a msg to get to and from the server. This only affects latency, so a high ping means you are "lagging" a tenth or so of a second behind the action. However, in recent times "lag" has come to mean any disruption of network connectivity that spoils your gaming experience!
Often ingame ping will be different to DOS ping. The ingame ping will include the time it takes for the game server code to process the request and return it, so will typically be higher than a DOS ping.
Another factor in online games is packet loss (p/l) this will make the game experience appear jumpy perhaps, or certain events wont register as expected. p/l is when network information goes missing whilst travelling between servers. So the server thinks you are dead, but the client isnt told. You carry on fighting and playing but all of a sudden the message gets through and all the event you think just happened are rejected by the server and you find yourself dead for no reason, or similar.
Im a regular player of the UT series of games, and must admit that network code and connection can make a big difference to ones enjoyment of the game. I now tend to play on local (london) servers only as it gets too frustrating to play around Europe.
Interestingly, I find I can enjoy a game with high ping, in UT up to about 120 is playable, but only if the connection is stable and the server is well setup. For the most part servers are underpowered, for example trying to host large games on limited bandwidth and CPU power and despite low pings the game experience is terrible.
Another factor is tick rate, in the UT world at least, each tick represents a server processing cycle, so each tick the server checks who is where and whether anyone has fired, been hit, etc. The more ticks a server does the more precise you have to be and the more CPU power you need. But with more ticks the ingame ping gets turned around quicker and so this makes people look like they have a lower ping. Server admins think this is a good thing, so they up their tickrates, sadly, although ingame reported pings may drop, you are in reality no nearer the server so your connection isnt really any better, all that happens is that the gaming experience deteriorates rapidly. Its probably the more experienced people who notice this, your shots just dont seem to connect anymore, the game doesnt feel right.
So high tickrates means I can play on a server in N.Europe with 40 ping and have a rubbish game, yet play on a local London server with ping 60 and hit every shot I take (maybe

!).
Anyways, many arguments have been had over the true meaning of these things and its just my interpretation - im sure others will have their own opinions! I will finish by saying that I do think its bad manners to blame lag etc. Ive lost many a fight due to network connections but will always say gg at the end. Blaming lag and taking away from the other persons win just seems pointless - I think it reflects quite badly on those that do it. Only super competative players have anything to prove, I couldnt care less whether people think I am good or bad, I just enjoy playing

!
GL & HF!