I encourage you to fully understand the difference in English, as it's an integral part of both English and Norwegian :)
In short: 'the' says that something is definite, that is, the speaker is talking of a particular orange. 'an' says that something is indefinite; so if the speaker had said 'an orange', it wouldn't matter which orange they were referring to; they're not talking about a particular orange.
You only need to know that:
- 'the' = '-en/-a/-et' at the end of a noun
- 'a/an' = 'en/ei/et'