As of version 2.40, Blender has an integrated Fluid simulator. It is the result of one of the Google Summer of Code projects. It allows you to define fluid bodies, obstacles and in- and outflow of fluids. The results are amazing but you should be prepared for some long and memory-hungry calculations, especially when you're using high-resolution meshes.
You can find the full documentation on the Blender Wiki, along with a few good tutorials to get you started:
Please note that there have been some changes in the GUI since these tutorials were written, so read these notes before you start.