Competing against an internal candidate for a job seems like an impossible task.
You are on the outside looking in while the other person already has a seat at the table. How do you overcome this insider advantage?
Don't assume it's an insider fix from the beginning. Most of the time when I hear candidates say this it is largely to salve their pain from simply losing out on a previous opportunity. We don't want to face the reality that someone else was better for the company's needs at that time.
Ask yourself, are they interviewing multiple candidates? Are they paying to fly people in for interviews? Are they using an outside recruiting firm? If the company is going to this extent then it means they aren't sure about the internal candidate. Interviewing costs significant time and money. If they already knew they had the right person on their bench they would just promote them.
As the outside candidate you are the change agent, the one with the fresh perspective. You must highlight the advantages of doing things differently. The insider candidate is the incumbent. Their message will be "stay the course."
Clearly differentiate yourself as the agent of change when you are competing against an internal candidate.