<P> The series concerns the adventures of Ted Mosby (played by Josh Radnor) narrating the story of how he met the mother of his children . The story goes into a flashback and starts in 2005 with a 27 - year - old Ted Mosby living in New York City and working as an architect; the narrative deals primarily with his best friends, including the long - lasting couple Marshall Eriksen (Jason Segel) and Lily Aldrin (Alyson Hannigan); the eccentric, womanizing - playboy Barney Stinson (Neil Patrick Harris); and news reporter Robin Scherbatsky (Cobie Smulders). The lives of all characters are entwined in each others . The series explores many storylines, including a "will they or won't they" relationship between Robin and each of the two single male friends, Marshall and Lily's relationship, and the ups and downs of the characters' careers . </P> <P> The show's frame story depicts Ted (voice of Bob Saget, uncredited) verbally retelling the story to his son Luke (David Henrie) and daughter Penny (Lyndsy Fonseca) as they sit on the couch in the year 2030 . This future - set frame is officially the show's "present day" and How I Met Your Mother exploits this framing device in numerous ways: to depict and re-depict events from multiple points of view; to set up jokes using quick and sometimes multiple flashbacks nested within the oral retelling; to substitute visual, verbal or aural euphemisms for activities Ted doesn't want to talk about with his children (sexual practices, use of illicit substances, vulgar language, etc .); and even to add some elements of humor: in the episode "How I Met Everyone Else", Ted describes his dates with a girlfriend whose name he has forgotten, leading all characters to act as though her given name were "Blah - Blah ." </P> <P> While the traditional love - story structure begins when the romantic leads first encounter each other, How I Met Your Mother does not introduce Ted's wife (Cristin Milioti) until the eighth - season finale, and only announces her name (Tracy McConnell) during the series finale . The show instead focuses on Ted's prior relationships and his dissatisfaction with those women, thus setting the stage for his eventual happiness with Tracy . </P> <P> How I Met Your Mother was inspired by Carter Bays and Craig Thomas's idea to "write about our friends and the stupid stuff we did in New York", where they previously worked as writers for Late Show with David Letterman, among others . The two drew from their friendship in creating the characters . Ted is based loosely on Bays, and Marshall and Lily are based loosely on Thomas and his wife . Thomas' wife Rebecca was initially reluctant to have a character based on her but agreed if they could get Alyson Hannigan to play her . Hannigan was looking to do more comedy work and was available . Josh Radnor and Jason Segel, who were cast as Ted and Marshall, respectively, were not well known, though Segel had been a cast member on the short - lived Freaks and Geeks and a recurring guest star on Judd Apatow follow - up Undeclared . The role of Barney was initially envisioned as a "John Belushi - type character" before Neil Patrick Harris won the role after being invited to an audition by the show's casting director Megan Branman . Pamela Fryman invited Bob Saget to be the voiceover narrator, Future Ted, explaining to him that the show would be like The Wonder Years but "kind of into the future". Saget either went to the television studio and recorded the narration while watching the episode, or did so separately and rerecorded with the episode if necessary . He normally did not attend table readings but did so for the last episode . </P>

Who marries ted in how i met your mother