Thank you for your question.
There are a couple of possibilities.
The first possibility and the most common possibility is that it could have been a folliculitis
or an infection of the hair follicle.
These infections are very common and can happen at virtually any part of the body.
The second possibility is that of a small cyst
in that area.
There are numerous glands in our skin that are called as sebaceous glands that secrete oil.
These glands can sometimes get blocked and cause a swelling to pop up just like you had one and these can cause some cheesy or white stuff to come out when you squeeze it.
All in all once any of these is squeezed and drained they usually heal up and there should be no problems.
Therefore I think this is not something to worry about a great deal and should heal up in a few days time.