If you are learning than it is usually not advised. Although it is good for Teshuva and for Gezeiros, it is otherwise frowned upon. Whatever it is, the it’s done is that you are Mekabel the day before by Mincha, or Mincha time. The Gemara says that fasting without a Kabala is as if a dog ate your food, there is no merit.
Most Rebbes would encourage you not to fast! If you must take on something – take one little thing and work on improving it. e.g say brocho of shehakol with more kavanah