In Norway there are two official written Norwegian languages, Bokmål and Nynorsk. In addition the indigenous Sámi people have their own official written language. The majority of the people in Norway are using Bokmål. But in areas in the Northwestern part of Norway and in the very south, Nynorsk is widely used. However, it should be noted that Bokmål and Nynorsk are not classified as two different languages where you have to learn the other as a foreign language. In short one could say that they are more two different written norms. Thus, text written in Bokmål is perfectly understandable for a person using Nynorsk, and vice versa.
Very few Norwegians, if anybody, speak the way a text is written, whether it's in Bokmål or Nynorsk. Instead they make use of our local dialects. For Norwegians the dialect makes up an important part of their identity, and by listening to a person's dialect we can in most cases determine with good accuracy from which part of the country he or she is from. Beginners to the Norwegian language might find some dialects hard to understand, but Norwegians are understanding and speak closer to the written language if they notice you don't understand them.
If you have a good command of Norwegian you're not only able to communicate with Norwegians, but also with people in Sweden and Denmark. The languages of the three Scandinavian countries are similar and in most cases you can speak in Norwegian to Danes and Swedes, and also read text written in Swedish and Danish.