Icelandic names are different from most other naming systems used in the West, in that the names follow a patronymic (sometimes matronymic) surname pattern.
This means that when a person is named, their last name is the name of their father, plus -son. So if a man called Eric had a son called Leif, Leif's name would be Leif Ericsson.
The same is true for females, although sometimes women take the name of their father for their last name, or the name of their mother. Also, the suffix -dottír is added to the end of the parent's name. So, if a girl called Astrid's parents were Leif and Inga, then their daughter could be called either Astrid Leifsdóttir, or Astrid Ingasdóttir.
Changes were announced to the laws about names in 2019. Given names are not limited by gender anymore. People that are registered officially with a non-binary gender will be able to use the suffix -bur ("child of") instead of -son or -dóttir.
This naming system is the same naming system that was used by the Vikings. Iceland has kept this naming system because Iceland is an island, and had little contact with the outside world for quite some time, so there was not much change in things like customs, language and naming systems.