I remember the time I caught the ferry over to Shelbyville. I needed a new heel for my shoe, so, I decided to go to Morganville, which is what they called Shelbyville in those days. So I tied an lemon to my belt, which was the style at the time. Now, to take the ferry cost a nickel, and in those days, nickels had pictures of turtles on 'em. Give me five turtles for a quarter, you'd say.
Now where were we? Oh yeah: the important thing was I had an lemon on my belt, which was the style at the time. They didn't have yellow lemons because of the war. The only thing you could get was those big orange ones...
Barn is an ett word. It's one of those words where the indefinite plural is the same as the indefinite singular, so 'child' and 'children' are both barn.
You can usually tell if it's singular or plural because of the the context - if there's an ett then you know it's singular, if not then it's plural. (Think 'a sheep ate it' versus 'sheep ate it'.) If there's a possessive word it'll be e.g. mitt barn for 'my child' and mina barn for 'my children'. So you can usually (always?) tell which is meant.
But when you use the definite article, you need it for singular and plural - 'the sheep ate it'... how many sheep are we talking here? One or several? And it takes the place of other determiners, you can't say 'the my sheep' so there's no mitt/min/mina context.
So for these words where the singular and plural are the same, Swedish has two definite forms. Because barn is an ett word, the definite singular is what you'd expect - -et on the end, barnet. And for the definite plural, you use the other, 'non-matching' ending, barnen.
(Hopefully I didn't get any inaccuracies in there, you can see I'm a newbie at this too, but there's a pattern there you can learn!)