ok... all your eggs are there when you're born, but they're not all totally finished.
you could think of it like a bunch of grapes- one on either side of your womb... but where the grapes are all teeny tiny little buds and not big ripe fruits yet. if the vine gets all the right conditions (chemical signals, etc) it decides to make one grape ripen every month (you ovulate) then lets it go, then it'll roll off down the tube towards your womb.
thats a really wonky visual but its working for me.
eta: if you take the pill, it'll change the chemicals in your body (like messing with the plant food, if we're using the grape imagery still) which means that your body isn't likely to decide to make that egg ripe, that month.
if you take the pill for years, those eggs just never get a chance to ripen. when you get the menopause they don't go bad, as much as just kinda turn into... raisins?
... ok seriously- when you get the menopause your body just stops sending signals telling those eggs to ripen every month. they just sit there like little buds, (unless you take hormones to tell them to grow into eggs again).