The basics
Allah says: “Eat and drink until the white thread of dawn becomes distinct from the black thread, then complete the fast until night” (Al-Baqarah 2:187). The intention can be made at night or, for a Ramadan fast in the Hanafi school, before midday. Suhur is a blessing (Sahih al-Bukhari 1923), and hurrying to break the fast at sunset is Sunnah (Sahih al-Bukhari 1957); see the dua for breaking the fast.
Things that do NOT break the fast
Eating or drinking by mistake: “Whoever forgets he is fasting and eats or drinks, let him complete his fast, for Allah fed him and gave him drink” (Sahih al-Bukhari 1933). Stop as soon as you remember. Vomiting that you did not cause (Sunan Abi Dawud 2380). Brushing teeth or using a miswak, as long as nothing is swallowed; the Hanafis dislike toothpaste while fasting because of the taste. Swallowing your own saliva. A wet dream, or waking up in janabah: the Prophet ﷺ sometimes woke at Fajr in janabah, did ghusl and fasted (Sahih al-Bukhari 1926). Eye drops and kohl (Hanafi). Bleeding, a blood test or giving blood (Hanafi). A shower or swimming, as long as water does not go down the throat. Dust or smoke you could not avoid. Smelling perfume (but not inhaling incense smoke on purpose).
Things that break the fast: make it up later (qada)
These break the fast and you must fast one day for each one after Ramadan: vomiting on purpose a mouthful (Sunan Abi Dawud 2380); eating or drinking because you thought it was still night or already sunset, then finding you were wrong; swallowing something that is not food or medicine on purpose, such as a pebble; medicine taken by mouth; nasal drops or sprays that reach the throat; an enema; and, in the classical Hanafi view, ear drops. A woman’s period or postnatal bleeding also ends the fast; she makes up the days later but not the prayers (Sahih Muslim 335).
Things that break the fast with kaffarah
In the Hanafi school, deliberately eating, drinking or having intercourse during a Ramadan fast, with no valid excuse, requires both making up the day and the expiation (kaffarah): fasting sixty days in a row, or, if truly unable, feeding sixty poor people (Sahih al-Bukhari 1936). Smoking on purpose is treated the same way. The Shafiʿi and Hanbali schools require kaffarah only for intercourse.
Modern questions
Injections into a muscle or vein for treatment do not break the fast according to many contemporary scholars, as they do not enter through a natural opening; nutritional drips (IV feeding) are treated by many as breaking it. Asthma inhalers: many Hanafi scholars hold that the medicine reaches the throat and so breaks the fast; if you need one, you are excused from fasting while you need it. Insulin, dialysis and IVF procedures each have detailed rulings. In these cases, follow your doctor’s advice and ask a qualified scholar.
Who is excused from fasting
Allah says: “Whoever of you is ill or on a journey, then an equal number of other days” (Al-Baqarah 2:184). The sick whose illness would get worse, and travellers (in the Hanafi school, a journey of about 78 km or more) may break the fast and make it up later. Pregnant and breastfeeding women who fear for themselves or the baby may also break it and make it up. The very old and the chronically ill who will never be able to fast pay fidyah: feeding one poor person for each day missed. Children are not obliged until puberty, but are trained gradually, as the Companions did (Sahih al-Bukhari 1960).
Protecting the reward
The fast is not only from food. The Prophet ﷺ said: “Whoever does not give up false speech and acting on it, Allah has no need of his giving up food and drink” (Sahih al-Bukhari 1903). If someone insults you, say: “I am fasting” (Sahih al-Bukhari 1894); see what to say when someone is rude. Use the month for Quran: start with reading the Quran in Arabic, and plan your prayers and taraweeh.