DPI means dots per inch. That means for every inch you have, you may have a gaming mouse that has 100, 1000, 10000 dots for every inch.
DPI is important for gaming as it can greatly affect your accuracy. A higher DPI will mean that your mouse is more accurate, which can make all the difference if your micro managing in Starcraft 2 or if your playing an FPS game like CSGO.
Razer gaming mice have been very popular and have some of the highest DPI settings around. You can get some of their mice which reach 20000 DPI.
Whilst a high DPI setting will make you more accurate, it also means your mouse becomes much more precise and slow. When you move your mouse across your screen with a high DPI setting, it will move much slower compared to a lower DPI.
Most gaming mice nowadays have a button on the topside that you can press which adjusts the DPI on the fly. You can go to a high DPI setting when your aiming down your sniper scope and then make it lower when your running around with your SMG.