Hi! in swedish we actually have several words for "the". We have "et" like in "tåget" "the train". Et is used when the noun is an "ett" word. Like in "a train" "ett tåg". "en" is the plural form of "et" as in "husen" "the house" or "tågen" the trains. "en" can also be used in singular as in "boken" the book or "garderoben" "the wardrobe".
"an" is singular for words that have the indefinite article "en". Like, "hyllan" "the shelf". Which would be "en hylla" a shelf. "na" is plural for words with the indefinite article "en" "hyllorna" "the shelves"
"Den" is used when you want to point something out. For an example, if you're walking in ikea and someone asks you which chair you want "vilken stol vill du ha?" You would say "Den stolen" "that chair". However "den is only used when the undefinite article is "en" if it's "ett" you would say "det" as in "det bordet" "that table"
hope this helped you a bit! it's a bit complicated, but once you get the hang of it, it's very easy! If I can do it, so can you!