The other posters explained what this dial is. To complete the answers, here's how and why to use it. Assuming you wear glasses with a small enough number, you can set the diopter dial to compensate for your vision imperfection. The way to do that is usually to set the dial such that the numbers and indicators in your viewfinder (like aperture and speed indicators) look sharp.
As to your question of why should you do that - many times viewing through the viewfinder with glasses actually reduces the apparent image of the scene so it degrades your ability to perfectly compose and frame your image. This is because the glasses further away your eye from the eyepiece (try looking at the viewfinder from afar and see what I mean). Removing the glasses lets you stick your eye to the viewfinder so you can see the whole frame. (Now, there is a technical term for that, but I just can't recall what it is.) If this is not a particular problem for you, then you can leave the diopter unchanged and stay with your glasses. I wish my number was low enough to allow me to remove my glasses.
Additionally, it eliminates yet another layer of (possibly dirty) glass between you and the scene.