My big toe hurts and is getting black at the side?

Needs to be seen. You have not given enough information to tell if you bruised it or have a significant problem i would see a podiatrist for exam.
Ingrown nail. Check it out this could get bad quick.