"It is a duck."
Translation:Det är en anka.
Because you use "det" when you are talking about something as yet undefined, which "it" is in that sentence. You don't define it as a duck--and therefore having a common gender--until the end of the sentence.
If you were to continue the conversation, say by going "It is a duck. It is brown." Then since you've established in the context of the conversation that "it" means "duck" you would use den instead.