In the original Rayman, they are found only in Dream Forest, and fly up from the water with their helicopter caudal fin. If Rayman touches them he loses a hit point, and if he's unlucky, he could be pushed into the water and lose a life. Rayman can defend himself from piranhas by punching or shooting them, which shatters their sharp teeth and then defeats them. A single punch can get rid of them.
In Rayman 2, they are found in any body of water that Rayman cannot swim in, usually polluted or stagnated water, or even acid. Two major kinds of piranhas live in those places: the small ones that devour Rayman when he falls into water, and the bigger ones that jump from water and try to bite him. A single energy ball can get rid of the second kind.
They are also present in both GBA and console versions of Rayman 3, mainly in the Bog of Murk, but while Rayman can actually swim in the dirty waters they live in, they will deplete his energy very quickly and cause a game over.