* Verb: This is the most common usage, meaning to make the characteristic sound of a duck. Example: "The duck quacked loudly."
* Noun: This refers to the sound itself. Example: "I heard a quack from the pond."
* Noun: This can also be used as a slang term for an unqualified or fraudulent doctor. Example: "He was accused of being a quack."
So, the part of speech depends on the context.