In accordance with ISS operational rules, in case of emergency, there's more than enough food, fuel, air and water on board the ISS. Therefore, the ISS crew has everything necessary for a normal stay on board the station until the arrival of the next spacecraft carrying crew and cargo.
The station's supply system is based on holding out for one missed cycle; that means that the supplies are stored keeping in mind that they should be sufficient to last until the launch following the canceled one.
Therefore, there are supplies, food, water, air and fuel on board the ISS to maintain the crew for 4-6 months.
There is also an emergency stock, designed for 40 days of autonomous existence. At the same time, the station's supplies of water and air are recycled.
If a decision is made to end the flight, the crew can return to Earth while the necessary work is being done. The astronauts would be able to leave the station within a few minutes; there is an emergency scenario that has been tested by the crew where the astronauts enter a descent vehicle and return to Earth.
Even in case of emergency, when the crew ends up isolated on board the ship (or the descent vehicle), they still have several days to determine the cause of the incident. At the same time, the astronauts can immediately undock or attempt (if possible) to save the station or equipment.
In turn, the ISS can be controlled from the Earth and function without a crew on board. Part of the crew can also leave the station, whereby some astronauts could return to Earth and some could remain on board waiting for the next launch and their colleagues.