This summary is not the rule. The rule text controls.
If you want to bring in outside evidence to challenge a witness's honesty or credibility, you usually have to give the witness a heads up first. This applies when you're trying to show the witness is biased, has something to gain by lying, said something different before, has a criminal record, or has some other problem that affects their ability to testify accurately.
Before you can bring in this outside proof, you need to ask the witness about it directly during questioning. You have to give them a fair chance to admit to the statement, action, or issue you're asking about. If the witness clearly admits to it, you may not need to bring in the extra evidence at all.
If the witness denies it or won't give a straight answer, then you can bring in outside evidence to prove your point. The main goal is fairness. The witness should get the chance to explain or own up to something before someone else is allowed to contradict them with outside proof. Courts can make exceptions to this rule when fairness requires it, but the standard practice is to confront the witness first.