Generally it's called a bruise....but you may have also done a little damage to the muscle or tendons.
If the pain doesn't go away - or at least if the pain doesn't lessen in a few more days - get to the doctor to be sure.
You can also bruise a bone, and a bone bruise takes a bit longer to heal than a normal "surface" bruise so it can be painful for much longer than just bumping your leg on a table or stubbing your toe.
Alternately, it could also be a fracture. A break is just that...the bone is...well...broken. A fracture means there is a "crack" in the bone, but the bone itself didn't actually break into 2 or more pieces. Both need to be cast, but a fracture usually doesn't take as long to heal.
If it's the front of your thigh it could be a pulled quad. If it's the back it could be a pulled hamstring! Ouch I've had two of those
You pulled a muscle.
You probably strained a muscle or tendon, visit your doctor or school nurse.
See a doctor!