True whales do not have teeth, but rather baleen, a kind of hard fringe suspended inside the mouth. They work like a fine mesh net that filters food from the water: the whale fills its mouth with water, which it then expels through the baleen that retains their food, usually consisting of small crustaceans that are part of the plankton or even fish (some can swallow entire shoals).
Most whales get their food for the entire year in 4 or 5 months in summer. During this period, when their weight can increase by up to 40%, they store energy in the form of fat, which they use to migrate to their breeding grounds.