Hi, Thanks for posting your query
From the information provided it seems to be a boil or a furuncle
which is pus filled.
Due to pressure and friction of socks it might burst with oozing of pus and blood
If the pus is too much it needs surgical drainage
under a cover of antibiotics.
Pain will dramatically decrease once pus is drained.
You may contact a doctor for its management
Hope this solves your query