You should see your primary care doctor
or your podiatrist
There are a few different possibilities. One is simply that this is local irritation to the base of the toe due to poorly fitting shoes. Other signs that this might be going on would include callus formation in the area, or noticing that the pain only occurs with certain kinds of shoes.
Another possibility might be an ingrown toenail, which occurs when the nail begins to grow down under the surrounding flap of skin. This can lead to swelling and pain. In grown toenails can often be treated by switching to looser fitting shoes, but it may sometimes be necessary to trim the nail as well.
Finally, paronychia is an infection of the skin fold at the edge of the nail, and this is characterized by redness and pain of the skin fold. More severe cases may also exhibit discharge of pus. Paronychia can be treated usually with warm water soaks to the area, although more advanced cases may require antibiotics or even incision and drainage of any pus pockets.
Again, please discuss this with primary care doctor for advice at your earliest convenience.