Macchiato means stained or marked, as the foam is stained by espresso. An Italian macchiato has two parts espresso and one part steamed milk, while Starbucks reverses the ratio.
Starbucks' caramel macchiato contains mostly milk with a splash of espresso, which technically means that it's not really a macchiato, although the foam is "stained" with espresso.
Meanwhile, outside of Starbucks, you can add caramel and vanilla to a latte to have a milkier coffee that is essentially what Starbucks calls a caramel macchiato.