Front or back? Could be a broken bone, torn ligament or could be a problem with the spine to name a few. Sounds a lot like a spinal injury based on information given but your vet will know more when they are able to examine your pup and get a history. You need to have your pup seen as soon as possible and in the meantime kennel and extremely limited activity are a must. Hope your pup feels better soon.
He could have a splinter/thorn in it. It sounds like his paw is hurting. He could also have fractured a bone. Take him to the vet.