While they don't have ears like mammals, they do have sensory organs that allow them to hear. Below is the excerpt from Wikipedia:
Hearing is an important sensory system for most species of fish. Hearing threshold and the ability to localize sound sources are reduced underwater, in which the speed of sound is faster than in air. Underwater hearing is by
bone conduction, and localization of sound appears to depend on differences in amplitude detected by bone conduction.
[7] As such, aquatic animals such as fish have a more specialized hearing apparatus that is effective underwater.
[8]
Fish can sense sound through their
lateral lines and their
otoliths (ears). Some fishes, such as some species of
carp and
herring, hear through their swim bladders, which function rather like a hearing aid.
[9]
Hearing is well-developed in
carp, which have the
Weberian organ, three specialized vertebral processes that transfer vibrations in the swim bladder to the inner ear.
Although it is hard to test sharks' hearing, they may have a sharp
sense of hearing and can possibly hear prey many miles away.
[10] A small opening on each side of their heads (not the
spiracle) leads directly into the
inner ear through a thin channel. The
lateral line shows a similar arrangement, and is open to the environment via a series of openings called lateral line
pores. This is a reminder of the common origin of these two vibration- and sound-detecting organs that are grouped together as the acoustico-lateralis system. In bony fish and
tetrapods the external opening into the inner ear has been lost.
Link for you, but I doubt you'll read it.
https://en.wikipedia.org/wiki/Sensory_systems_in_fish
I recommend in the future refraining from posting before you have verified your facts.