What voluntary fasting is
A voluntary fast follows the same basic rules as the fast of Ramadan. You make the intention, and you avoid food, drink and marital relations from dawn until sunset. For a voluntary fast, the Hanafi, Shafi'i and Hanbali schools allow you to make the intention in the morning, as long as you have not eaten or drunk since dawn, because the Prophet ﷺ once asked for food, found none, and said, "Then I am fasting." The Maliki school requires the intention before dawn for every fast.
These fasts are recommended, not required. They bring extra reward and help you build self-control. If you owe missed days from Ramadan, it is better to make them up first. Scholars differ on whether a voluntary fast kept before the make-up days is valid: most allow it, while some Hanbali scholars do not.