Succession to the British throne is determined by Parliament, not by the personal decision of the monarch.
The relevant law is the Succession to the Crown Act (2013). This amends the 1701 Act of Settlement, and sets down that the oldest child of the monarch, whether male or female, will succeed to the throne upon the monarch's death.
If Prince Charles is still alive at the time the Queen dies, the law says that he will become King. Any change to the line of succession before then would require a further Act of Parliament; not just in the UK, but in 15 other countries which have the Queen as head of state. No changes were made to exclude Charles in 2013, and they are highly unlikely to be made now.
However, there are precedents for a King to abdicate, the most recent being Edward VIII in 1936. If Prince Charles so chose, he could renounce the throne immediately and make William the King in his place. This also would require an Act of Parliament; but in the case of Edward VIII the Declaration of Abdication Act was passed very rapidly, and something similar could be done again.