"The boy has a book."
Translation:Pojken har en bok.
Nouns in Swedish (and Danish too) belong to either a common (-en nouns) or neuter gender (-ett nouns). Depending on the gender (which usually you'll have to learn,) you use the different articles and definite endings. en pojke (pojken) [common; -en noun], ett äpple (äpplet) [neuter; -ett noun]
There really isn't any particular logic behind it, so you'll just have to memorize, I'm afraid. There are however couple of rules that might be helpful. Words related to persons/living things/professions are typically common 'en' nouns: en pojke, flicka, man, kvinna, fotograf, programmerare, hund, häst, anka. (Exception: 'barn' (child) is 'ett'!)
Also, if you have to guess: around 75% of all Swedish nouns are common 'en' nouns!