The essential part of an Islamic fast is to not eat, drink or have sex or intentional ejaculation or orgasm etc. during the day; with the intention of observing a fast.
The day starts at astronomical dawn and ends at sunset.
Its sunnah to eat a little just before the start of the fast (called Suhoor ). The fast is ended (called Iftar) with a meal or water at sunset. You can eat, drink etc. through the night.