The PBY came about because the Navy was starting to anticipate that it might need a long range aircraft to cover the Pacific. Consolidated started to work on the design in the early 30's and the first flight was in 1935.
The Catalina was first introduced to the Navy squadrons in 1936 and over the years saw a number of improvements. The last active military aircraft wasn't retired until the 1980's which I imagine is almost a record (The B-52 may break that).
The Catalinas were used in every major theater of the war. They were also used by the British, Canadians and Australians. They have also seen service with some other countries.
There are still some in use today even.
It may not be the prettiest bird but it got the job done.
During wartime, it was equipped with 3 0.30 caliber machine guns and 2 0.50 caliber machine guns. It could carry 4,000 pounds of bombs or depth charges.