Duolingo just gave me the sentence "Wir haben einen Hund." Why is it einen instead of ein?
No no. German has four cases. "Einen Hund" is "a dog" in the accusative singular case. It has nothing to do with the verb form "haben." Masculine and feminine nouns, however, do not have a special form for the accustive case. Thus you would say "Das Buch ist gut, where "Buch" is the subject of the sentence and in the nominative case. When you say "Ich siehe das Buch" (I see the booko) the word "Buch" is the object of the verb "sehe" and in the accusative case.
Now as I have said before there is no difference between the nominative and the accusative in neuter german nouns. This is also true in the case of feminin nouns (Die Frau ist gut.)/(Ich sehe die Frau).
But you have two different nominative and accusative forms for the word "Mann" Thus you would say "Der Mann ist gut." and "Ich sehe den Mann."
These kinds of distinctions make German harder to learn than Dutch, which is closely related to German but has many fewer endings for its nouns and verbs. If you go on to study Afrikaans, which is a derivative of Dutch, you have even fewer of these forms. Afrikaans is similar to English in this feature of its grammar. English expresses the accusative or objective case only in its pronouns, as in the sentences "I see him" and "He sees me." German maintains some of these distinctions also for its nouns--mostly in the articles and determiners that come before the nouns (der Mann)/(den Mann), both of which forms would be "the man" in English. Similarly, in the case of demonstrative adjectives or determiners as they are more frequently called these days, German has similar case endings. For example consider the sentences "Dieser Mann ist Gut" (this man is good. and "Ich sehe diesen Mann" (I see this man.) Note that the -n at the end of the accusative singular is the same for both der/den and dieser/diesen.