Right because I'm an old man (although if I was a young person in a poor country with endemic Polio this could still be my story today) I actually went to school one day and they fed me a sugar lump with a dot of green syrup on it. The syrup is Oral Polio Vaccine, you are eating the literal working Polio virus, but the makers have deliberately grown it somewhere very cold, so it's adapted to run much too slowly so as to not die. In your body it's too slow and when it tries to escape from the digestive system into your body a normal healthy human immune systems says - "Hey, you're not food, you're a virus. Die die die" and your body learns specifically to kill Polio as a result, successful immunisation before the virus can grow and spread.
In a rich country like mine (or statistically, yours) today, the vaccine given to school kids is an injection and doesn't have a working virus in it. As a result, when things go wrong (and very rarely they do go wrong) it can't cause Polio. But, there are two costs. One, literally this is an expensive product. Poor countries can't afford to dose their kids with the expensive harder to store and use injection. Two though, maybe even more important. It doesn't work so well. If you live in a country with no Polio, "not as well" is good enough. But in countries with endemic Polio, you want the best option and that's arguably OPV at least for now.