How does election work in Germany? I have no clue. xD
Every citizen has two votes. The first decides an candidate in the polling district (of which are 299) and the one with the relative majority gets a seat in the parliament. The second vote decide which party gets how many seats, based on proportions. This is where it gets complicated: if per first vote more candidates are voted into the parliament than they get as proportion of the second vote, the number of parliament seats will be increased (normally it is 598) until the proportion leads to enough seats for the party to accomodate all direct candidates. This is complicated further, as for this calculation every state is looked alone, but the size of the parliament grows overall. So in reality it become often more than 600 seats.
Ah yes, also if a party that has less than 5% of second votes or wins less than 3 seats through the first vote, then all second votes of this party are dismissed.