Sacred Citation & SourceVerse 2:187 defines the fast: "Eat and drink until the white thread of dawn becomes clear to you from the black thread, then complete the fast until the night." The fast means abstaining from food, drink and marital relations from dawn to sunset. The Prophet ﷺ said: "Whoever forgets and eats or drinks, let him complete his fast; Allah has fed him and given him drink" (Bukhari 1933, Muslim 1155). So a mistake out of forgetfulness does not break the fast. For details such as medicine, injections or blood tests, the schools and councils give different answers; ask a qualified scholar for your case.