The main character is of course the ugly duckling. It's the one that the story focuses on, from its difficult beginning as an outcast among the ducks to its transformation into a beautiful swan.
The other ducks and the animals in the barnyard are also characters. They play the role of the antagonists in a way. Their rejection and bullying of the ugly duckling drive the plot and show the difficulties the main character has to face.
The mother duck is also an important character. She initially takes in the ugly duckling, but even she is somewhat puzzled by how different it looks from the other ducklings. Her actions set the stage for the ugly duckling's early experiences among the duck family.