Microsoft’s Java VM was included in Windows XP RTM and SP1, but due to legal case with Sun Microsoft are no longer allowed to distribute their Java VM, only update existing installations for security flaws. For this reason the Microsoft’s Java VM was removed from Windows XP SP1a and SP2.
So now as VoG pointed out you should download and install Sun’s VM if you need one. Microsoft’s VM can still be installed on SP2 but it is not available from Microsoft as legally they are not allowed to provide it. An example of how it may end up being installed is if you install a software package that requires it and the provider has included a re-distributable version on the CD.
I think people have pretty much covered what it is for, running java programs such as games in your browser.