It's really not that weird if you understand how a busy internet works. Ping time is the amount of time it takes for a data package (normally a very small one) to get from your computer, through numerous routers, to another computer (server), for that computer to interpret the data package, send a response, go through numerous routers, and get back to your computer ... whew. And yes, when things are working nicely, you can get a ping time of 16ms (that is really fast!). Now, what happens when anything along that trip is busy. Just like at the grocery store, the data packets have to wait in line (buffers). And just like the grocery store, the lines are usually not that long, but sometimes, like the day before Thanksgiving, they are really long. Some routers/computers have more "day b4 Thanksgivings" than others. You ping google.com and the result comes back pretty steady. You ping a game server between 5pm and midnight and the ping times can be all over the place.
What can you do to minimize the likeliness of inconsistent pings? First off, you only have control over your network. Your ISP has control over their part of the path. A lot of the internet is controlled by Bill Gates or the illuminati or something (ok, not really). And the last part is controlled by the game company or whomever they contract with. Therefore, you have very little control.
1. Make sure noone else on your network is uploading massive amounts of data while your trying to game. Computer backups, iCloud stuff, etc are your enemy. Many routers have QoS (Quality of Service) settings that will help (by making sure none gets all the bandwidth at once ... of course, this can also slow people down and they don't like that). The necessity and effectiveness of QoS really depends on what kind of devices and how many are on your network.
2. Avoid WiFi and other network technologies that are prone to interference. Interference slows things down.
3. Test your ISP's link. If there are problems, contact them and hopefully they will help (you having a good gaming experience is not a priority for all ISPs).
Test your network: ping your router (use -n 50 ping x.x.x.x ) to test your network. Ping times should be small and consistent with no packet loss.
Test your ISP: ping your ISP's router (you can use tracert to discover your ISPs router IP address). Ping times will be a bit higher, but should still be consistent. More than one lost packet is an issue.