They appear to be purple Sperm Whales. They blow sprouts of air every few seconds. Whales only appear in World 4-2 after you go through the first door. Whales like the Hawkmouth are harmless themselves. However, their sprout of air can harm players. If you land on the blowhole (where the sprout comes up) you won't get hurt, but you will be sent upwards. Only if you touch the sprout from the side you can get hurt. Whales tails are hard. Trying to get an Ace Coin, Mushroom, or 1-up on its tail could harm the player if they are not careful.
If you use a Starman on the Whale's sprout, the sprout will stop. A Vegetable does not affect the sprout. Whales cannot be defeated, nor do they go back in the sea. It is probably because they are like platforms.