There are a few exceptions to this general rule. Some fish, such as the livebearer, give birth to live young instead of laying eggs. In these cases, the eggs are fertilized and develop inside the female's body, and the young fish are born when they are fully developed.
Other fish, such as the anglerfish, use a unique method of reproduction called sexual parasitism. In this case, the male fish is much smaller than the female, and he permanently attaches himself to her body. The male fish then fertilizes the female's eggs, and the young fish develop inside of her body.
Regardless of the specific method of reproduction, all fish release their eggs or young through the vent.