Get a fishing rod, through DIY crafting or by purchasing one from Nook's Cranny shop, and equip it.
Go to the shore, stand in front of a fish's dark shadow and press "A" to cast your rod in its direction.
Stare at the bobber and listen to the sound of the water. When the fish bites, you'll hear a louder splashing sound and the bobber will be pulled underwater — reel the fish (or other items like trash) in by pressing "A" once within a second or so.
Fish will nibble on your line up to 4 times before biting!