Friendship Is Magic takes place in the land of Equestria, populated by varieties of ponies (including pegasus and unicorn variants), along with numbers of other sentient and non-sentient creatures. The show is centered on the character Twilight Sparkle, a unicorn pony sent by her mentor and ruler of Equestria, Princess Celestia, to the town of Ponyville to study the magic of friendship. In the show's opening episodes, Twilight is initially resentful of this assignment, more concerned about the foretold appearance of Nightmare Moon. When Nightmare Moon does appear, vowing for an everlasting night and causing Celestia to disappear, Twilight sets off with five other ponies—Applejack, Fluttershy, Pinkie Pie, Rainbow Dash, and Rarity—to obtain the Elements of Harmony and defeat Nightmare Moon. Before Twilight can activate them, Nightmare Moon appears and shatters the Elements. Twilight, in a flash of inspiration, realizes that her new friends each represent the Elements of Harmony, herself being the final piece, Magic. Together, the magical power of their friendship reverts Nightmare Moon to a repentant Princess Luna. Celestia reappears, and after reuniting with her sister, allows Twilight to stay in Ponyville to continue studying the magic of friendship.
Later episodes of the show feature individual episodes that follow Twilight and her friends dealing with various problems around Ponyville. At the end of each episode, Twilight sends a report back to Celestia explaining what she learned about friendship from these adventures. There is a loose continuity in these episodes; a theme throughout the first season, for example, shows the ponies' preparing for the Grand Galloping Gala that occurs in the final episode of the first season.
One central theme of the show involves "cutie marks", iconic symbols that magically appear on a pony's flank once he or she has discovered his or her special talent in life. While physically young adults, the six main characters are envisioned to be similar in maturity to human teenagers in 12- to 18-year-old range, and one episode, "Cutie Mark Chronicles", highlights how each received their cutie mark as younger fillies.[ Several episodes focus on the exploits of a much younger trio of pony characters that call themselves the "Cutie Mark Crusaders" who have yet to receive their cutie marks. The three are teased by other young ponies as "blank flanks". In response, they desperately hurry to try to discover their talents to receive their own cutie marks, often doing so in comical fashions.