First thing, the more crooked the chain line (for example while on the big chain ring, also being on a large rear cog or being on the small chainring and the small rear cog) the more likely that chain will not drop properly on the small chain ring. Unlike the rear cogs where the chain is pulled to the next gear, the front deraileur basically just pushes the chain off the ring where it drops to the smaller ring.
You were in a poor choice of rear cog when you switched to your small chainring. Better would have been that you had downshifted onto a larger rear cog, 20, 23 or 25 before shifting your front chainring. That said, because the chain has to drop in the front, basicaly all you can be doing is turning the cranks while coasting, until the small ring takes up the chain. You can continue to push the pedals while shifting the rear, but you must let up when shifting the front.
I like to make sure I've done my downshift on the level before hitting the hill, or if on the hill, make sure I've downshifted to my larger rear cog, spin up a bit to get some headway, then shift the front, being careful not to start putting force on the pedals until the front is firmly on the small ring, then I upshift the rear quickly to get to the next lower gear I was aiming for when I was going up the hill.
I know that is not a good enough explanation, but I hope it helps. Apparently you are new at this. Keep riding, and practise shifting your front down. Going up in front is also something that takes a bit of practise for you have to allow the big ring to start taking the chain before you start putting force into your pedals. And don't make the mistake of stopping your pedal rotation while shifting, as I have seen some people do. That will tend to cause the chain to snap into where it was when you started pedaling again, which could be right in between the front chain rings. That can jam your chain in there and bend your chainrings.
Sometimes, it's just how fast you threw the shift lever that causes the chain to overjump and miss the small chainring, sometimes exacerbated by a bump in the road just when you shifted.
Final words, everyone has dropped their chain more than once. It's part of bicycling, so practise to minimize the conditions that tend to cause the chain to drop.