What does the .git/index.lock file actually do?

I have had the issue currently where I needed to remove my .git/index.lock file. Without too much hesitation I am guessing that this file somehow locks processes that can access the git repo. Howev...