What medication need to be taken for acidity?

Antacid. An h2 blocker (like Pepcid (famotidine) or its generic) once or twice daily, provides relief for many after about a week. If this fails, a proton pump inhibitor (ppi--like Prilosec or its generic) will often work where h2's have failed. If both fail after at least one week trial of each, see your dr or a GI dr for eval.