Tagamet can be taken with or without food. To prevent heartburn, take one tablet with a glass of water right before or up to 30 minutes before eating or drinking. Follow the dosage instructions provided by your doctor or on the package. Do not take more than two tablets in 24 hours unless directed by a healthcare provider.