Cast your Fishing Rod by holding down the appropriate button on your gaming system and release when the bar is close to the top. Casting into deeper water (darker shade of blue) gets you better quality fish. Next, wait for the sound of a Fish bite which coincides with the
[!] above your head, and click the same button again to hook it. Now time to reel in and receive your wet, slimy reward.
A lot of people including myself really disliked this part when first playing as the mechanics are unfamiliar unless you're played Geometry Dash before. You need to press your Tool Use button to raise the green fishing bar to keep the Fish covered, with the thin, colored progress bar next to it showing how close you are to reeling it in. Gravity alone (unclicking) is what you "use" to lower your green bar. It is frustrating until you get the hang of it. If you practice Fishing and get good at it, it's a great moneymaker in early game.
Don't get discouraged by a few difficult Fish as some are very hard to reel in while others just sit there at the bottom, asking you to take them home and be a pet. Or dinner, whatever you like.
More here in the Wiki:
https://stardewvalleywiki.com/Fishing