Ferrets are known for a distinct musky odor, but it is not necessarily "bad." The scent comes from scent glands near their rear end, which they use for marking territory and communication. Urine, feces, and diet also contribute to the overall smell.
The odor is usually not unbearable. It is musky and somewhat sweet rather than foul, and its strength varies by individual ferret, diet, and hygiene. Regular bathing, cage cleaning, and a balanced diet can significantly reduce the scent.
If you are considering getting a ferret, talk to experienced owners to learn about managing their natural smell.