Answer:
To stay away from things that are considered forbidden such as lying, stealing, and such things. Also, there are things that you have to keep in mind that fasting isn't just about staying away from food, it is also staying away from haram things and trying to do as much good, which will train you to do as much good as you can in the long run, by keeping you away from haram and forbidden things afterwards.