Which event led to the siege of Yorktown?

Which event led to the siege of Yorktown?