A diverted flight is one that has been routed from its original arrival destination to a new, typically temporary, arrival destination. The leg of the flight that is routed back to the original arrival destination is called the recovery leg.
When you are viewing flight information for a diverted flight, you will see the diversion leg. The recovery leg will be displayed only if available.