First, there are two types of freshwater fish: Egg-layers and live-bearers. Just as their name suggests, egg-layers lay eggs, and live-bearers give birth to live young, called fry.
Unless you catch a female egg-layer in the act of laying eggs, you can't sex them. Males and females look exactly the same. An example of an egg-laying species of fish are zebra danios
Different story for live-bearers. If you look at a take of live-bearing fish, you'll see that about half of them will have a modified anal fin, called a gonapodia (not 100% sure on the name, but it's similar). These are the males, and the gonapodia is, just as it looks, the fishy equivalent to a penis. Females have a more flat anal fin, and when pregnant, you're able to see the fry's eyes through her skin. An example of a live-bearer are swordfish and platies.
Since most fish that are eaten are egg-layers, you can't tell what sex the fish is just by looking at it. You would have to be familiar with fish anatomy and dissect it.