Aquaponics is the combination of aquatics (raising fish/aquatic animals) and hydroponics (growing plants in water instead of soil). Aquaponics works because the water, in which the roots of the plants rests or that fills the grow beds where plants are placed, contains the nutrients that plants need to grow (specifically, nitrates).
These nutrients become too much for the fish unless removed (aquatics systems require water changes or sufficient water replacement in a large pond) but the plants naturally remove these nutrients for their own food. Then, the “clean” water is returned to the fish tank and the system starts again.
It’s an ideal system in which the fish produce what the plants need and the plants remove the nutrients that would become too toxic for the fish so their water stays in balance.