Fish waste is composed of ammonia and nitrites, both of which will kill fish. Bacteria exists in the water that will convert these nasties into nitrates, fertilizer. Unfortunately, our ponds are not build to contain enough of these critters to do the complete job. A biological filter is designed to make a home for enough of them to grow and multiply and do their job. You'll see all kinds of fancy things on a filter, but the real working guts is a box with an inlet and an outlet and something inside with lots of surface area where bacteria can grow.
Notice pump outlets.
Clockwise, the top right one supplies the filter, the bottom right attaches to a hose and nozzle to clean the filter, bottom left will supply a future small stream, top left is waterfall supply for any volume that is left over. The black pope on top is a manifold to attach to the waterfall supply to spread out the water behind the waterfall rocks. I cut it to shape and supported it with a few bricks. I used to say the filter material is anything with lots of surface area - plastic hair curlers, rings of PVC pipe, tubing, sponge, air filter matting, anything that will let water freely pass. These materials can flake off bits or dissolve and kill your fish.