This is quite a common occurrence. Either owners accidentally leave the drain open for too long, or the water lines disconnect and pumps the water out. Those who catch it in time are lucky. What you do next will determine whether your fish will live or die!
Always keep some water conditioners or anti-chlorine handy. Have enough in store in case you ever need to perform a 100% water change, for emergencies. Top your water up, using these conditioners and add vigorous aeration since the dechlorination reaction consumes oxygen.
But what if you don’t have anti-chlorine on hand? It is relatively safe to increase the water remaining by up to 10-15% only. Then the next day, purchase the products from your local aquarium store and top the rest of your water up. Never top up more than 20% without using anti-chlorine since the chlorine in tap water can kill your fish.
To keep fish safe from ponds draining fully, always position your water pumps on top of bricks. This means that if the pump runs dry, the pond will still have sufficient water until they are discovered.