As an example of this at work let's look at a scenario where Sam the attendant of the ticket booth wants to eat a snack at the booth he's working in. Both the Booth class and the Employee class 'have a' Food field. For the Employee it is a Snack and for the Booth it is a MonkeyTail.
In this scenario, Sam wants to eat the Monkey Tail that the booth has (since he's there and he's hungry). So a bit of code to start us out might look like this:
Which looks like this in an object diagram:
A new ticket booth is defined, a new food is instantiated and has some values assigned to its fields. Then a new Employee is defined and their fields have values assigned to them. Looking at the code it seems like the Booth and the Attendant have the same object (The $5 Monkey Tail) as their Food. While this is true in description they are not the same food item. Because of the instantiation of the items in different places, there are actually two different Food items in memory that have nothing to do with one another.
Instead what should happen is that the MoneyTail from the Booth should be the food item Sam wants to have.
To do this, you would assign Sam's Snack field to a reference to the previously instantiated MonkeyTail the booth has.
Which looks like this in an object diagram:
To show this reference, note in the example below that the Attendant's Snack and the Booth's MoneyTail have the same values without an extra instantiation being done.
It's important to note that the class diagram at the beginning doesn't say anything about which objects are instantiated and referenced. It only shows the structure of the classes.