If its small you should be able to cut the edges of the toenail out yourself. Relief can also be had by soaking the foot in warm water, then placing small swatches of cotton ball under the edge of the nail, to keep it raised of the bed of the nail. You should actually feel pain relief immediately when you lift the nail.
Longer-term, make sure you cut your nails straight across. Keep the edges of the nail above the nail bed so they can't grow under.
If its your big toes and really painful or looking infected, go to emerg and they will freeze the toe (an extremely painful experience) then cut a sliver of nail away (you don't feel a thing). There is zero pain afterwards; the nail just grows back in.
Enjoy!