Flat characters are black and white. When we read a story with flat characters, we walk away unsure of what makes that character tick.
The novel I am editing right now actually explains something about each character when we first meet them. We learn a little of their background and what motivates them. I do not agree that everybody should do this, but for this particular novel, it works.
Now, just telling me that your character is motivated to find the pirate's gold, or to marry the woman, or to kill Dr. Michner, is not characterization. To make your characters real, you have to know what they eat (and don't eat), what they read, what they wear. You also need to know why they do the things they do. Are they struggling to be famous? Are they trying to get out of a bad relationship?
You as the author need to know everything about your character. You do not need to tell me everything about him. Unless something interesting happens in the bathroom - I do not need to know about it as a reader. We all have to use it, and for the most part there is very little that can happen that is exciting in there. And if something interesting happens in there, the reader better know why or find out sometime in the book.
In addition to understanding your character, you need to make him or her logical. You can have a good character, who helps little old ladies across the street and rescues puppies but works as a hitman - as long as you justify his behavior. If you don't - if your character is motivated and does things strictly because (a) you're the author and you said so and/or (b) he or she has to do it or it will ruin your plot - the character will be flat. As a reader, I want to know why the guy is a hitman if he is rescuing little old ladies and puppies on the side.
If I were writing a book like that, my hitman would have been abused alongside of his sister as a child, because he loved his sister, he always stood up for her - hence anything that is weak he helps and cannot kill. However, since he was abused, he is challenged by taking out the capable and competent. I would not tell the reader this in the story, I would show him or her. I would have the hitman talk about his sister in ways that are loving. I would have him get angry whenever he is told what to do, and I would throw in a plot twist right around the climax where he is sent to kill someone and discovers the person is a blind, helpless, female.
When I write, I become my characters. I like to know everything about them and then I write from their perspective. Perhaps this is because I was originally trained to be a method actor before switching my concentration to costuming halfway through my theatre degree.
P.S. The few the number of main characters, the easier it is to know them. Once you get to six characters, you will generally begin to transpose one character on another one.