Most people use both words interchangeably. But there's a basic difference. Simply put, we taste with our mouths but distinguish flavors with our nose.
Skeptical? Just pinch your nose when tasting apple puree and onion puree by turns. You probably can't tell the difference until you release your nostrils.
This is because flavor is registered by the olfactory bulb behind the nose and info is passed on to the brain. Pinching the nostrils denies air to the olfactory bulb and therefore blocks any information.
The olfactory bulb can distinguish between thousands of different flavors but the mouth can only distinguish five tastes (sweet, sour, salty, bitter, and 'umami'). Umami ('delicious' in Japanese) is the savoury taste abundantly present in mushrooms, seaweed, fish, marmite, and other substances. Umami is the taste of MSG.
(The above was paraphrased and summarised from my readings. Thought it interesting enough to share with you. )