die Marine
navy
A country's naval forces; the part of the military that operates at sea.
Nach der Schule ging er für vier Jahre zur Marine.
After school, he joined the navy for four years.

navy / navy blue
Loading your saved state.
navy
A country's naval forces; the part of the military that operates at sea.
Nach der Schule ging er für vier Jahre zur Marine.
After school, he joined the navy for four years.

The word 'Marine' (navy / navy blue) comes from French and is related to the Latin word 'mare' (the sea). This origin explains both meanings: the naval forces that operate at sea and the dark blue color that recalls the deep sea.
Die Marine schützt die Küsten des Landes.
The navy protects the country's coasts.
Whether the military or the color is meant can usually be recognized from the article. 'Die Marine' (the navy, with an article) almost always refers to the naval forces. The color term 'Marine' (navy blue) often appears without an article, for example after a preposition like 'in'.
Die Marine hat neue Schiffe bestellt.
The navy has ordered new ships.
To express that someone joins the naval forces, you use 'zur Marine gehen' (to join the navy). If someone already serves there, you say 'bei der Marine sein' (to be in the navy).
Er wollte schon immer zur Marine gehen.
He always wanted to join the navy.
army
'die Armee' and 'die Marine' both belong to a country's military. The important difference is the area they refer to: 'die Armee' often means the armed forces as a whole, or especially soldiers on land. 'die Marine' is the part of the military that operates at sea, that is, with ships and naval operations. Learners may confuse the words because both sound military-related. If it is about land or the military in general, 'Armee' is usually more suitable. If it is about the sea, 'Marine' is more precise.

Im Hafen besichtigten die Besucher ein Schiff der Marine.
In the harbor, the visitors toured a navy ship.
Die Armee wurde zur Verteidigung der Grenze eingesetzt.
The army was deployed to defend the border.