The thing about second winds is that they can't be counted on when you need them. They're a real phenomenon, yes, but what they are not is a predictable phenomenon.
Second winds depend on a number of factors, including everything from exercise intensity and frequency to what kind of shape you're in. But although physiologists know they happen, they don't all agree what's going on behind the scenes to cause it. Some theorize that your second wind, also known as a runner's high, may be caused by the body's release of pain-relieving endorphins. However, that doesn't explain the whole thing. More commonly that "high" is believed to happen as the body's systems come back into balance: Your respiration is regulated; your oxygen intake is fast, deep and plenty; and your body is operating at a slightly elevated temperature, covering you in a light sweat.
When your second wind kicks in, which takes roughly 10 to 15 minutes to happen, give or take five minutes or so (generally, that is; some people may have to wait much longer), it's because your body has stopped focusing on expelling excess carbon dioxide and started taking in more oxygen. That's aerobic energy production (also called aerobic metabolism), and that translates into less pain, easier breathing and a renewed confidence that although you might not have wanted to exercise, maybe it wasn't such a bad idea after all.