And, moreover, when you get an inkling of a character or plot, how do you fill in the spaces you haven't figured out yet?
I know there's no switch to flip or formula to follow, but I guess there's no harm in asking
Since I write mostly historical fiction, it's probably a little bit easier for me than for many other folks to get ideas. I find an event or a specific character from the past that interests me, and I start exploring the real history. As I research, I keep a list of questions that have stumped me, or a list of things I want to know more about. As I search for the answers to questions or more clarity on the fine points that hold my interest, I come up with more and more questions until a plot begins to form in my brain.
For example, my current WIP takes place in ancient Egypt and is about the parents of Hatshepsut, the female Pharaoh. I started out intending to write a novel about Hatshepsut's life (and still intend to), but while researching Hatshepsut I learned about a curious inscription on the wall of the temple she built that tells an "origin story." The story claims that she has a male soul and was intended by the gods to be male, and that her mother actually conceived her with a god, not with her mortal father. The story is certainly political propaganda, used to legitimize her unusual reign, but I started asking myself, "What if SOMEBODY really believed that this story was true? What if that somebody was Hatshepsut's mother?"
From those questions, an entire 120,000-word book formed. It took some time to develop characters and play around with the plot, but I think it's going well, and it's amost done. And then it'll be edited down to something less than 120,000 words.
So, for me, it's just asking questions. Here's a bit of the process that helped fill in the plot holes for God's Wife, my present WIP (title probably to be changed soon.) Once I settled on Hatshepsut's mom believing that her child had a male soul and was the offspring of a god, I asked and answered these questions:
Why would she believe this? What reason would she have for trusting such an unusual belief? Because she's been a visionary and an interpreter of dreams her whole life. She doesn't always get the dreams right, but she thinks she always does.
Well, okay, so she's a visionary and she has a daughter. What stands in her way, aside from the fact that it's unusual for a female to be the heir to the throne? Ancient Egyptians weren't particularly hostile toward women, and many women held a great deal of power. So what really stands in Ahmose's way of making her daughter the heir? Oh, look! My research has uncovered the fact that Hatshepsut's father had three sons who all died long before he did. Maybe Hatshepsut couldn't be the heir not only because she was female, but because there were these boy children hanging around messing things up for her mother. Research indicates that the boys were probably the children of a lesser queen named Mutnofret.
Who was Mutnofret? Research doesn't give me many clues, other than that she was married to the Pharaoh and was probably the mother of his sons. If she was married to the Pharaoh, she was probably from the royal family.
What if Ahmose and Mutnofret were sisters? What if Mutnofret was supposed to be the First Queen, but for political reasons, Ahmose, the younger sister, was chosen instead? Ahhh, now I've got some real conflict going. Ahmose and Mutnofret start out with strong conflict early in their lives, and as they become mothers that conflict carries over into a competition between them to see whose child will become the heir to the throne.
And on it goes. Just asking myself questions in a "what if" format allows me to play around with answers, which turn into strong ideas, which turn into plots and characters.
I'm sure there are tons of other ways to do it, but I've been really happy with the results I've had from finding something that piques my interest -- maybe something as bland as an engraving on a temple wall -- and asking myself a string of questions about it.

I hope that helps give you some ideas!