Many of the original patrol aircraft were converted from long-range bombers, with notable conversions being the widespread use of B-24 Liberator's during World War II to patrol the areas between Iceland and Greenland and attack German submarines.
After the war the patrol role was generally taken over by conversions of civilian airliners, who's range and performance was now better than most WWII bombers, while the latest jet-powered bombers did not have the endurance needed for long over-water cruising. The main threat throughout the 1960s and into the 1980s were Soviet attack submarines, which were found primarily with the use of sonobouys, and then attacked with homing torpedos.
Today the threat of a large scale submarine attack is remote, and many forces are downsizing their partol aircraft fleets. Those still in service are used primarily for counter-smuggling and fishing limits enforment duties.
Examples: