Interviewing as a candidate is precarious. There are 2 modes you typically find yourself in. There is the "I just need a job, any job" mode, and there is the "I have a job, so I can be choosy" mode.
For more junior folks, they will typically just take what's offered. Make some money. Learn some things. If it doesn't work out, move on. After you repeat this pattern a handful of times, you begin to identify some trends. You start to see that organizations are just collections of humans. Humans are flawed. Organizations are exceptional at a lower rate than individuals are.
Upon accepting a position, you generally have no idea what you're walking into. After the first month on the job, you'll have a little more clarity. You'll begin to notice some major red flags, and then there will be a voice in your head that says "would I have accepted this job if I had known about this?"
One such red flag is discovering that your manager is not in good standing with his manager. Great, I just got hired by the guy that everyone views as a stooge. Now I'm the stooge of a stooge by default. Could I have vetted this situation more thoroughly prior to taking the job? You can't exactly ask in the interview "So, who's the village idiot among the senior leadership team? Is it you?"
But there are some hints that you can glean. If the hiring manager has recently been promoted, that likely bodes well for you. He's earned some credibility in the eyes of decision makers, and he's growing a team. This sounds like a good opportunity.
On the other hand, if the hiring manager reveals to you that she has been with the company her entire 20 year career, and has just hung around as a passenger on the ride, this is a smell. For one, we all know familiarity breeds contempt. This person has likely been the fixture among a cast of characters that are rotating around her. She's perpetually upset that they brought in yet another outsider for the big role above her. She felt like it was her "turn".
This may be a controversial opinion, but staying put in one company for decades says something about a person. It says they like to be comfortable. It says that they don't like change. It may indicate that they aren't hire-able outside the company. Life is fluid. Standing still is rarely the optimal strategy.
Everyone knows that an interview is a two way street. Most people agree that the company is interviewing the candidate, and the candidate is interviewing the company. I am proposing to simplify this. As a candidate, you aren't interviewing "them". You are interviewing the individual, the hiring manager. After all, a company isn't something you can ask questions of. A person is.
A person doesn't quit her job, she quits her manager. What's the inverse of this? A person isn't hired to work for a company, she's hired to work for a manager.
Make sure you don't fall for classic traps, such as the company's name recognition, perceived stability, or overvaluing the compensation.