
gegen
against
Expresses resistance, opposition, or competition.
Deutschland spielt heute Abend gegen Frankreich.
Germany is playing against France tonight.
against / around
Loading your saved state.

against
Expresses resistance, opposition, or competition.
Deutschland spielt heute Abend gegen Frankreich.
Germany is playing against France tonight.

against / into
Describes movement toward something, often with contact.
Er ist mit dem Fahrrad gegen einen Baum gefahren.
He rode his bike into a tree.

around
Indicates an approximate, estimated time or quantity; approximately.
Wir treffen uns gegen 19 Uhr vor dem Kino.
We're meeting around 7 p.m. in front of the cinema.

for
Describes an exchange or trade.
Ich tausche mein altes Handy gegen dein Tablet.
I'll trade my old phone for your tablet.

compared with
Used for a comparison; in relation to.
Gegen ihre Leistung ist mein Ergebnis nichts.
Compared with her performance, my result is nothing.
The preposition 'gegen' (against) always requires the accusative. No matter which meaning it is used in, the following noun or pronoun must be in the accusative.
Viele Menschen sind gegen den neuen Plan der Regierung.
Many people are against the government's new plan.
You can recognize the meaning of 'gegen' (against / around) from context. In sports or conflicts, it is about opposition (m01), with numbers it indicates an estimate (m03), and with verbs like 'tauschen' (to exchange) it indicates an exchange (m04).
Ich nehme ein Medikament gegen meine Kopfschmerzen.
I'm taking medicine for my headache.
In the meaning of 'Widerstand' (resistance), 'gegen' (against) is often used in fixed combinations: to be for or against something, to violate the law, a remedy for an illness, or protests against a decision.
Bist du für oder gegen den Vorschlag?
Are you for or against the proposal?
When 'gegen' (against / into) describes movement, it often implies unintended or forceful contact. Typical verbs for this are 'fahren' (to drive/ride), 'laufen' (to walk/run), 'stoßen' (to bump), or 'prallen' (to crash/bounce).
Pass auf, dass du nicht gegen die Glastür läufst!
Watch out that you don't walk into the glass door!
When 'gegen' (compared with) expresses a comparison, the phrase often comes at the beginning of the sentence, followed by a noun in the accusative and then the main clause.
Gegen seine Erfahrung bin ich ein Anfänger.
Compared with his experience, I'm a beginner.
on / onto / open
Auf and gegen can describe movement toward a surface. Auf presents the surface as the destination of the movement, while gegen places more emphasis on contact or impact. So auf is suitable for a normal landing, while gegen is more appropriate for a noticeable collision.

Der Ball prallt hart gegen den Boden.
The ball bounces hard against the ground.
Der Ball fällt weich auf den Boden.
The ball falls softly onto the ground.