It sounds as though your toe may be broken. If so, it will obviously be painful to walk on.
The best thing to do initially is to seek medical advice. A doctor will be able to tell if it is broken and whether it requires any medical treatment. If the toe is numb, go to the hospital as soon as possible.A broken or sprained toe that shows no obvious signs of complications (bleeding, numbness, infection) can be treated at home.
It is often helpful to strap the toe to the next one to keep it as still as possible (as in the above photo). It may be more comfortable to place some cotton wool between the toes before strapping.
If possible, try to rest as much as possible and elevate the foot. This will reduce blood flow to the foot and thus relieve pain. It is helpful to put an ice pack onto your toe while it is elevated but remember never to put ice directly onto skin.
If the pain is severe you can take over the counter painkillers, however, if it is excruciating, it is best to seek medical help.
A broken toe is a common injury which usually heals fully in around six weeks, so try not to worry too much!