There are more characters to your book than just the protagonist and the antagonist. A rich array of secondary characters add a lot to a story, and give your main characters a break. Your hero and heroine can't be at center stage throughout every scene; the secondary characters can take over now and then to offer conflict, comic relief, dramatic exposition -- anything to enrich the story. Just as we have friends and family in our lives, so should your protagonist.
What defines a secondary character? Anyone other than the main characters. In Gone with the Wind, Scarlett and Rhett are main characters. But so are Ashley and Melanie Wilkes, who are both so pivitol to the story that they really couldn't be called secondary characters. They're not the protagonists, so I'd say they're just a step below that and of nearly equal importance to the story.
True secondary characters in Gone with the Wind would be Aunt Pittypat, Prissy, Big Sam, Frank Kennedy, to name just a few. (In fact, in the movie version of Gone with the Wind Scarlett's first two husbands were left out entirely, without hurting the story one bit.) And there are many walk-on characters who add to the story but are not vital to the plot -- Belle Watling, the Tarleton twins, and various soldiers and shopkeepers are examples.
To make sure all of your characters are multi-dimensional, create contradictions. There's nothing wrong with having that sweet, cookie-baking grandmother in your story; but how about this -- in an early scene you have the grandmother sit at the kitchen table with her freshly baked plate of cookies; she starts talking about the time when she was one of the "Freedom Riders" in the early 1960s who rode on two buses to the Deep South and encountered great violence. That bit of unexpected information keeps Grandma from being a cliché.
One of my favorite characters in literature is Lennie in Of Mice and Men. He's the Gentle Giant, but one who doesn't know his own strength. He's not the protagonist -- that would be George -- but he is the source of all the conflict. The tragedy is set up when Lennie accidentally kills the mouse he keeps in his pocket because he likes to pet soft things, then kills one of the puppies in the barn the same way. Then, when he accidentally kills Curly's wife, his fate is sealed.
The contradictions you create for your characters are a good way to set the scene for a later action. Grandma is sweet and soft-spoken, but if you're going to have her step up to the plate and show her inner strength at a later point in the story, then you need to have shown another side to her in order for that strength to be believable.
Don't bother, however, to flesh out walk-on characters. If they're just there as a function of the plot, they don't need layers. The waitress who brings your character breakfast once doesn't need a back story. But please -- don't have her chewing gum!
"Most of the basic material a writer works with is acquired before the age of fifteen." Willa Cather