Whales are mammals because they give birth to live young, they have fur (although it is very sparse on their body), they have lungs and breath air and they provide milk for their young.
Dolphins and other whales are all mammals called cetaceans. Mammals, and only mammals, have fur or hair and they feed their babies milk. Whales all feed their babies milk. You may be thinking that whales dont have any fur. You are mostly right. They have fur when they are fetuses, but lose it before they are born. A few species have whiskers as adults and whiskers are a type of hair.