A manuscript of the Atharva veda
About 1000 BC, doctors in northern India wrote the Atharva veda, a medical textbook explaining how to treat diseases. Like Egyptian medical texts a little earlier, the Atharva veda says that diseases are caused by bad spirits, and you treat the disease by killing the spirits with poisons or spells. One example is the treatment of leprosy with a kind of lichen, which might have worked as an antibiotic. Another example is the treatment of snakebite by reciting charms.
The surgeon Sushruta may have lived about 500 BC. Sushruta left a book, the Samhita, explaining his surgical methods. Sushruta described how to pull teeth, how to fix broken bones, and how to fix blockages of the intestines. He did operations on people's eyes to remove cataracts which sometimes worked a little, though more often they left the patient completely blind. He didn't have any anesthesia other than wine. About the same time, Indian people were using sand and charcoal filters to get clean water, which probably saved many lives.
By about 200 AD, Indian doctors, like Chinese doctors and Greek doctors, had abandoned the idea of bad spirits in favor of the somewhat less wrong idea of dosha or humors. The doctor Charaka wrote perhaps about this time. Charaka recognized that prevention was the best cure for many diseases, and he recommended keeping your humors in balance in order to stay healthy. Charaka recognized three humors - bile, phlegm (snot), and wind. If your humors got out of balance, you should take medicines to rebalance them. But they also knew some working medicines: doctors recommended citrons to cure scurvy (Vitamin C deficiency).
By this time, Indian doctors also knew more about how your body worked: Charaka knew that blood vessels both brought food to various parts of your body and also carried wastes away.
Charaka also made the earliest Indian reference to smallpox, and this is just around the time that smallpox first devastated the Roman Empire, coming from the East. Indian doctors were the first to invent a way to inoculate people against smallpox. In the 700s AD, a doctor called Madhav wrote about inoculation. Madhav knew that you could keep people from catching smallpox by scraping a little pus or scabs from someone who had smallpox, letting it sit around for a while, and then giving a small amount as an inoculation, either by sticking it into their skin on a needle, or by blowing the powder up their nose.
When Muslims conquered northern India about 1000 AD, many Persian doctors came to India from West Asia to work for Muslim kings there. These doctors realized that the Indian list of humors didn't match the Islamic list of humors, and tried to find out what was right. For example, some Muslim doctors began to include wind as one of the humors, and to combine black bile and yellow bile as one humor.