They know the lake or other body of water where they are, so they know where the fish are at any given time of day.
Shoebills will patiently wade through the water or stand still and wait for a fish to swim up to them on its own. When the fish approaches, the bird dives in and spreads its wings. The suddenly spread wings stun the fish for a moment, and the Shoebill catches it, crushes it with its powerful beak, and swallows the catch.