der Hof
yard / courtyard
An open area enclosed by buildings or walls, for example the courtyard of a house or the schoolyard of a school.
In der Pause treffen sich alle Schüler auf dem Hof.
During the break, all the students meet in the schoolyard.

yard / farm / court
Loading your saved state.
yard / courtyard
An open area enclosed by buildings or walls, for example the courtyard of a house or the schoolyard of a school.
In der Pause treffen sich alle Schüler auf dem Hof.
During the break, all the students meet in the schoolyard.

'Hof' (yard/farm/court) is a base word for many compounds that make the meaning more precise. Examples are 'Bauernhof' (farm), 'Innenhof' (courtyard), 'Schulhof' (schoolyard), or 'Gerichtshof' (court of law).
Die Kinder spielen im Hinterhof des Gebäudes.
The children are playing in the building's backyard.
The preposition depends on the meaning. You are 'im Hof' (in the enclosed courtyard), 'auf dem Hof' (on the farm, in the schoolyard), or 'am Hof' (at the royal court).
Die Hühner laufen frei auf dem Hof herum.
The chickens roam freely around the farm.
The expression 'jemandem den Hof machen' (to court someone) is fixed. It means to woo someone romantically. The person being courted is always in the dative.
Er kauft ihr jeden Tag Blumen und macht ihr den Hof.
He buys her flowers every day and courts her.
When a place is being referred to, key words help distinguish the meaning. 'Schule' (school) or 'Pause' (break) point to a schoolyard, while 'Tiere' (animals), 'Traktor' (tractor), or 'Bauer' (farmer) point to a farm.
Er verbrachte seine Kindheit auf einem Hof auf dem Land.
He spent his childhood on a farm in the countryside.
When 'Hof' (court) describes an institution, words like 'König' (king) or 'Adel' (nobility) point to the royal court. Words like 'Richter' (judge), 'Urteil' (judgment), or 'Angeklagter' (defendant) point to a court of law.
Die Etikette am Hofe des Kaisers war sehr streng.
The etiquette at the emperor's court was very strict.
In the meaning 'königlicher Hof' (royal court), the old dative form 'am Hofe' or 'bei Hofe' is often used. This form sounds historical and is restricted to this context.
Der junge Künstler wurde bei Hofe vorgestellt.
The young artist was introduced at court.
In legal language or in the news, 'der Hof' (the court) is often used as a short form of 'der Gerichtshof' (the court of law). It is a technical abbreviation.
Der Hof befand den Angeklagten für schuldig.
The court found the defendant guilty.
place / space
'Platz' and 'Hof' can both refer to open areas, but they describe different places. A 'Platz' is often an open area in a town or city, for example a market square, or generally a free area. A 'Hof' is usually located between or next to buildings and belongs to a house, a school, or a farm. Learners may confuse the words because both can be outdoors and open. The important point is: a 'Platz' is usually public or generally open; a 'Hof' often belongs to a building or business.

Nach der Pause spielen die Kinder noch kurz auf dem Hof.
After the break, the children play briefly in the schoolyard.
Auf dem Platz vor dem Rathaus stehen heute viele Marktstände.
There are many market stalls on the square in front of the town hall today.