It's right there in the title: How I Met Your Mother, and it's the question we waited nine seasons to have answered. So how did Ted meet the mother of his children? Well, of course, the finale was full of misdirections, at first when Ted locks eyes on the pretty bassist at Barney and Robin's wedding you think, Awww this is how he meets her? So sweet! But instead of introducing himself to the future mother of his children, he bails on the wedding to head to the train station, where, surprise! The Mother is there standing under her yellow umbrella. So Ted decides to go tap her on the shoulder and say, "Excuse me, hi."
The Mother knows exactly who he is: best man, professor of that college class he accidentally taught, and stealer of her yellow umbrella. He knows exactly who she is: wedding bassist, roommate of his ex, and stealer of his yellow umbrella. They bond over their argument of whose umbrella it is before realizing they'd essentially spent a lot of their lives right near each other, only never having met. So Ted does what he does best, gives a dorkily sweet, "Hi," she gives one back, and, that kids, is how Ted Mosby met the mother.
Image: CBS; crushable