If you accidentally step on a cat's paw and it squeals in pain, the cat will instinctively try to run away. Don't force it to come out. Wait a few minutes and then lure it out with food. Once it comes out, be sure to check the spot where it was stepped on.
1. Do not force it to come out.
When a cat is stepped on, it usually tries to run away. Owners often panic and keep calling the cat's name, which only makes the cat run further away. Understand that this is a normal behavior for cats when they are hurt, and it's best to go along with the cat's actions. Let the cat hide; don't forcibly pull it out, otherwise it will think its owner is trying to catch and hit it. 
2. Use food or toys to lure the cat out.
Cat owners might worry that their cat will hold a grudge if they step on its foot, but cats actually don't hold grudges very much. As long as you treat it with food or play with its toys afterwards, it will quickly become affectionate again.
Of course, when it comes over on its own, remember to pet its head and chin, and then whisper a few words to it. The cat will then be able to sense your kindness.
3. Don't forget to check the areas where your cat was stepped on.
After your cat reveals itself, be sure to check its paws. First, check if the area where it was stepped on is swollen. Then, gently touch it to see if it reacts strongly (meows or pulls back to avoid being touched again). Finally, check if the cat is limping.
If your cat has swelling and a sprain, apply an ice pack to the area for 15 minutes, twice a day. Also, limit your cat's movement; don't let it run around. If your cat's injury is severe or doesn't improve after a day, I recommend taking it to a veterinarian immediately.