grenzen an
to border on
To have a shared geographical border with another region, country, or piece of land.
Österreich grenzt im Norden an Deutschland.
Austria borders Germany to the north.

to border / verge
Loading your saved state.
to border on
To have a shared geographical border with another region, country, or piece of land.
Österreich grenzt im Norden an Deutschland.
Austria borders Germany to the north.

The verb 'grenzen' (to border/verge) is derived directly from the noun 'die Grenze' (the border). If you know the noun, you can more easily infer the meaning of the verb.
Die alte Mauer bildet die Grenze unseres Grundstücks.
The old wall forms the boundary of our property.
The verb 'grenzen' (to border/verge) is almost always used with the preposition 'an' and the accusative. The pattern is: etwas grenzt an etwas (Akkusativ) (something borders on something).
Unser Garten grenzt direkt an einen öffentlichen Park.
Our garden borders directly on a public park.
Whether the literal or figurative meaning is intended can be recognized from the object after 'an'. Geographical places point to the literal meaning, while abstract terms point to the figurative one.
Polen grenzt an die Ostsee.
Poland borders on the Baltic Sea.
In the figurative meaning, 'grenzen an' (to verge on) is often combined with strong, abstract nouns to describe an extreme state. Common phrases are 'an ein Wunder grenzen' (to border on a miracle), 'an Wahnsinn grenzen' (to border on madness), or 'an Dummheit grenzen' (to border on stupidity).
Es grenzt an ein Wunder, dass bei dem Sturm niemand verletzt wurde.
It borders on a miracle that no one was injured in the storm.
to limit / border
'begrenzen' and 'grenzen' look similar, but they are used differently. 'begrenzen' means that something is given a boundary or that a quantity, duration, or scope is kept smaller. It usually has an accusative object: you 'begrenzen' something. 'grenzen' is almost always used with 'an' and describes a country, property, or area being next to another one. Figuratively, 'grenzen an' can also mean that something comes very close to a certain quality. The risk of confusion comes from the similar form. The important point is: 'begrenzen' creates or sets a boundary, while 'grenzen an' describes adjacency or closeness.

Unser Garten grenzt direkt an den kleinen Park hinter dem Haus.
Our garden borders directly on the small park behind the house.
Ich begrenze die Zahl der Gäste, damit der Raum nicht zu voll wird.
I am limiting the number of guests so that the room does not get too full.