The brain recognizes colour predominantly over anything else and hence why contrast is generally associated with colour but contrast in design has super power beyond most peoples knowledge.
To put simply contrast is a way of defining or creating differences by way of shape, colour, size and location.
The effect of contrast plays a big psychological effect on us as humans because contrast is actually the reason why we can see and identify things at all.
Contrast is not just a visual tool to make things look pretty or relative, its highly functional.
With regards to documents we use contrast by way of headers and text to define areas and then we may use different type and even sub-headers as contrasting tools to highlight different sections and normality.
Contrast can point out important sections or group together pieces to create a common relationship.
Other pieces such as signs use contrast in colour to highlight warnings and danger.
Websites may use a sidebar with one colour and the main body in another. This is to direct us as viewers and create functionality.