Check for slivers, then wash, put antibacterial ointment on it, a bandage, and ice it if it's still hurting. It can also be imobolized by taping to adjoining toe.
The pain may be due to the fungus infection which would have formed between your toes. you have to clean your toes clealny with dettol. you can also use anti fungal cream such as Lotramin or betamethasone cream and take some pain relief medicine like paracetemol 500 mg. Always wear socks.