Spear phishing is any phishing attack aimed at a specific named person, using researched detail to make the message credible. Whaling is spear phishing where the target is a senior executive, so the same technique carries far more authority and a much larger payout.
The mechanics are identical. What changes is the value of the target. A spear-phishing email to a junior analyst yields one account. The same email to a finance director can move money directly, because that person already holds payment authority nobody will question.
Whaling also runs in the other direction. Attackers impersonate the executive rather than target them, which is why whaling, CEO fraud and business email compromise overlap so heavily in practice.
Related: whaling vs CEO fraud · spear phishing vs phishing · Business email compromise