How to warn people that they are about to navigate to a different page?

In the accessibility design guidelines for navigation Apple recommends the following:

Warn people before they activate a control that opens a different webpage or app. Changing the context without warning can cause confusion and forces people suddenly to rebuild their mental model of the onscreen environment.

Unfortunately, they don't provide a specific recommendation on how to achieve that. What are the best practices in this space?