It was not until 1923 that Norway required people to have surnames that were passed down to the next generation. It is good to read up one these things as noted earlier.
In General:
People that lived in cities most likely had a surname much earlier, which was for most people either their patronymic name (i.e. Jensen), a geonymic name (i.e. farm name), or a surname they brought to Norway when the family first moved from another country, but as previously noted could be anything.
On the farm, people that moved around regularly had a first name, sometime a second name, a patronymic name, and a "current" geonymic name.
If they moved to a place that required a surname very often that name was what ever the recording entity thought was a good surname, which led to spelling changes, siblings having different surnames, etc etc etc.