In Link's Awakening, Link can not actually obtain the Fishing Rod, but he can rent it for 10 Rupees from the Fisherman located in the Fishing Pond, north of Madam MeowMeow's house. Link is only able to fish in that area. Using the rod, Link can catch fish to grant him Rupees or even a Piece of Heart as rewards.
Ocarina of Time
In Ocarina of Time, Link can obtain the Fishing Rod by renting it from the Fisherman for 20 Rupees. Link can only use the Fishing Rod in the Fishing Pond. Link can also find the Sinking Lure, which allows Link to catch fishes easier and can easily catch the Hylian Loach. Although it is illegal, the Fisherman will allow Link to have it.
In Phantom Hourglass, the Fishing Rod is given to Link by the Old Wayfarer after he unites him with Joanne. It allows Link to fish on the S.S. Linebeck. Once the rod is obtained, shadows of fish will start to appear on the sea. When the ship is above the fish's shadow, Link can start fishing.