This is taken from the Wikipedia entry on the Prince of Wales:
The title Prince of Wales is given only to the heir apparent—that is, somebody who cannot be displaced in the succession to the throne by any future birth. The United Kingdom had practiced male primogeniture, which meant that the heir apparent was the eldest son of the reigning monarch, or, if he was deceased, his eldest son, and so on, or if the monarch's eldest son had died without issue, the monarch's second eldest son, etc. As such, a daughter of the sovereign who was next in line to the throne was never the "heir apparent" because she would be displaced in the succession by any future legitimate son of the sovereign, and could not therefore take the title.
On October 28, 2011, the leaders of all 16 Commonwealth realms agreed to end the practice of male primogeniture regarding heirs to the throne. The Succession to the Crown Act 2013 was introduced on December 12, 2012, published the next day, and received the Royal Assent on 25 April 2013. The change will be implemented simultaneously in all 16 realms after the necessary legislation has been passed in those that need to amend their constitutions. No woman has ever held the title Princess of Wales in her own right, although a female first child may one day hold that title.
Since the title of Prince of Wales is not automatic, there have been times where there was no Prince of Wales. There was no heir apparent during the reign of George VI, who had no sons. Princess Elizabeth was heiress presumptive, and was hence not eligible to be titled Princess of Wales. After it became obvious that George VI was unlikely to father more children, the option of bestowing the title of Princess of Wales was considered (but ultimately rejected, due in large part to a lack of enthusiasm for the idea from the heiress presumptive herself). There was also no Prince of Wales for the first several years of the reign of Elizabeth II. Prince Charles was not named Prince of Wales until 1958 when he was nine years old.
The title of Princess of Wales has always been held by the Prince's wife in her capacity as spouse of the heir apparent and therefore future queen consort. The current Princess of Wales is HRH Camilla, Duchess of Cornwall who automatically assumed the title upon her legal marriage to Charles, Prince of Wales. Camilla however has chosen not to be publicly known by the title due to its association with her predecessor, Diana.
The title and estates of the Duchy of Cornwall will automatically become William's when Charles becomes King because this was established by charter in the 14th century and is now treated as an Act of Parliament.