Prince of Wales is a royal title. It is usually held by the eldest son of the King or Queen of the United Kingdom. The title is not automatic, but is given by the reigning monarch.
When a person becomes King or Queen, their eldest son immediately becomes Duke of Cornwall and Duke of Rothesay. The current Prince of Wales, Prince Charles, was born in 1948, and was known as Prince Charles of Edinburgh (his father is The Duke of Edinburgh). In 1952, his mother became Queen, and he became The Duke of Cornwall (in Scotland he was called The Prince Charles, Duke of Rothesay). In 1957, the Queen made him Prince of Wales, and he is now called Prince of Wales, except in Scotland, where he is still The Prince Charles, Duke of Rothesay.
King George II created his son, Prince Frederick, Prince of Wales. When Frederick died, the King made Frederick's eldest son, George, Prince of Wales.