Err can be used for pretty much everything, however it is mostly used when someone proves they are particularly knowledgeable about a topic, as a general insult or when someone is being a bit of an all-round twat.