I hurt my hand hitting it on someone's leg and it bent back. It immediately swelled the swelling is just above my wrist next to my thumb (right hand)?

Get it checked ASAP. Injuries of the hand can be complex and the location, mechanism of injury and rapidity of swelling suggest either an avulsion fracture, tendon injury, or other injury such as dislocation of one or more of the bones in the hand near the wrist. If you have a family doc, they often can see you for an acute care visit. Consider an urgent care facility or the ER. Best to take hand injuries seriously.