The German legislative branch of government, or the Bundestag, has 598 nominal seats in total, but they are elected based on two votes. So let's take a look at how Germany's electoral system works.
Every voter has essentially two ballots to cast. One is for a member of parliament in their constituency -- half of the candidates are elected this way. The other ballot is for a particular party and the remaining 299 seats are based on each party's share of this vote.
However, a party needs to get at least 5% of the second votes to earn representation. To make sure the Bundestag reflects the overall share each party receives, compensation seats may be allocated to balance the proportion so technically, there could be more than 598 seats.
One of the first tasks of the Bundestag is to elect a federal chancellor who will form a new government. They would, of course, need an absolute majority of agreement.
That is where coalitions come in. Bigger parties team up with smaller parties to get the votes they need to push legislation.