The fast begins when one goes to sleep at night, unless one plans to wake up early to eat before the fast begins. If one planned to wake up early, he can eat until a lot ha’shachar (dawn) [1] which is 72 minutes before sunrise. The fast ends at tzeit ha’kochavim, nightfall. (There are different opinions regarding when tzeit ha’kochavim occurs. Rav Moshe Feinstein evaluated that it is 50 minutes after sunset, but if one is having difficulty fasting, he may break the fast 40 minutes following sunset.)
Most years, Megilla reading follows maariv at the end of the fast. It is then preferable to refrain from eating until after hearing the Megillah. If one is having a difficult time fasting, especially if he/she is waiting to hear a later reading of the Megillah, one may eat a snack after tzeit ha’kochavim. If one is very weak and needs to eat a meal, they may do so, but they should assign someone to remind them to hear the Megillah [2].
If Purim is on Sunday, and since fasting is prohibited on Shabbos, the fast is moved from Shabbos to the preceding Thursday. The fast won’t be followed by Megillah reading, and eating will be permitted immediately after nightfall.
______
[1] Shulchan Aruch O.C. 564:1
[2] Mishnah Berurah O.C. 692:16