A boiler’s function is to heat water in order to heat the home. This usually requires water being heated to very high temperatures.
A water heater specifically heats water for taking showers, for the laundry or other domestic uses. This does not usually require water to be heated to such high temperatures as with a boiler.