Scents disperse more slowly in water than they do in air, nevertheless smell is an important source of information for fish. So much so, that many fish have four nostrils, two in and two out. In this way they are constantly able to access new scent information. Also, it is important to remember that no fish can breath threw its nostrils, they are only for detecting smells. Fish (Osteichthyes) have their nostrils on the upper side of their head, while Sharks and Rays (Chondrichthyes or elasmobranchs) have theirs on the lower side of their head.
Not all fish have an olfactory pit (= nostrils, olfactory rosette [O.R.] and connective channels), Puffer fish, and their relatives in the Tetraodontidae have lost theirs completely and so have no sense of smell. Hagfish and Lampreys have only a single central nostril and O.R.; in Hagfish water in through the nostril, over the O.R. and then continues on into the gut, but in Lampreys water is pumped in and out of a muscular pocket called the 'hypophysical pouch'.
Sharks and Rays, and some fish, such as Wrasses and Cichlids have only two nostrils, in the elasmobranchs, and in some of the fish, each nostril is divided into two halves by a flap of skin (an inlet and an outlet half) and water is pumped through, and over the O.R. by beating cilia.
The 'olfactory rosette' is a specialised area of epithelium within the 'olfactory pit'. It is where the scents are actually detected and its surface is greatly folded, thus allowing a large number of sensory cells to be packed into a small area. These sensory cells are basically the same as those used for taste, however nerves from the O.R. lead to the olfactory centre of the brain, a distinct and separate part of the brain from that used to analyze tastes.
Fish use smell in a number of distinctly different ways.
1) Fish use smell to recognize places in their environment, even over considerable amounts of time, for instance Salmon remember the smell of the river they were spawned in.
2) Some fish, such as Tetalurus natalis recognise each other as individuals by scent, or smell.
3) Fish use smell to communicate danger, Minnows release and alarm pheromone into the water if their skin is damaged.
4) Fish use smell in reproduction, pheromones released by females can trigger courting behavior in males (Bathygobius soporator), or appease male aggression to invasive conspecifics (a conspecific is another member of the same species).
5) Fish use smell to find food. A shark zeroing in on the source of an attractive scent such as blood uses the same sort of zigzag approach that a male moth uses when homing in on a receptive female. By testing continually across the flow of the scent, and assessing its changing strength an animal can quickly focus on the source.