Acidity is a general term which usually refers to regurgitation of acid or partly digested food from the stomach into the food pipe (Oesophagus) or mouth.
The sourness is due to fermentation of food in the stomach or over secretion of acid.
Heartburn describes a burning sensation behind the breast bone or sternum.