Since the 1990s South Korea has been carrying out an extensive and expensive modernization of their fleet, building all of the ships locally using more modern technology (sometimes licensed from the United States and other Western suppliers). The ship building effort has become so extensive that it is now possible to retire a lot more of the older ships. Rather than scrap these South Korea has refurbished many of them and put them to work as patrol vessels, to guard against the continuing threat of North Korean amphibious infiltration efforts.
An example of this recycling program occurred in in December 2015 when South Korea decommissioned six warships. These included a 34 year old frigate, four patrol boats and a corvette. The retired frigate belonged to the Ulsan class, which entered service in the 1980s and was among the first locally built warships. There are still six Ulsans in service and they will also be retired. These elderly Ulsans are being modified and used as training or patrol ships. Many of the smaller retired ships are refurbished a bit and donated to other nations who cannot afford new ships. The Philippines has received some of these as well as Peru.
The new ships are world class and include Aegis destroyers (the KDX III class), a new class of frigate (FFK) modern submarines as well as new missile patrol boats. Since North Korea became more belligerent after 2010 South Korea has also invested in more anti-submarine and naval surveillance technology. South Korea can afford this because it has a much larger GDP than North Korea and is a leader in the development and manufacture of many new technologies. All this is a major reason why North Korea wants to develop effective nuclear weapons and equally reliable ballistic missiles to deliver them. The North Koreans are getting close.