The canonical answer is that if the coin tosses are independent and the coin is fair, then the probability of a head coming up after having seen 10 heads in a row is still $\frac{1}{2}$.
Of course, that's not how our minds really work, and calls into question what probability "really" means. If you had just seen 10 heads in a row, you would probably have doubts about the fairness of the coin or the independence of the tosses — in other words, the very hypotheses which lead to the answer of $\frac{1}{2}$. What then should you do? Well, in the Bayesian school of probability, we could put probabilities on the hypotheses themselves, and revise the probabilities, according to Bayes law, as we collect more data. For example, suppose we accept the hypothesis of independence but regard the probability $p$ of heads as an unknown, and that we initially assume any value of $p$ between $0$ and $1$ is equally likely. Thus, we believe that the probability of seeing a heads is $\frac{1}{2}$. Then, after seeing one head, we revise our beliefs, and say that the probability of $p$ being between $a$ and $b$ is $b^2 - a^2$, and the probability of seeing another heads is $\frac{2}{3}$. If we see another head, we revise again and say that the probability is $b^3 - a^3$ and the probability of seeing another heads is $\frac{3}{4}$, and so on. So, starting from the belief that any value of $p$ is equally likely, after seeing 10 consecutive heads, we would believe that the probability of $p$ being between, say, $0.45$ and $0.55$ is less than $0.124 \%$, but the probability of $p$ being between $0.9$ and $1.0$ is over $68.6\%$. That's over 2 orders of magnitude of difference. Whatever $p$ actually is, having seen 10 consecutive heads, we should now believe that the probability of seeing another heads is $\frac{11}{12}$.
Alternatively, we could use the machinery of hypothesis testing. Our null hypothesis is that the coin tosses are independent and the coin is fair, and our alternative hypothesis is that it is not. Under the null hypothesis, the probability of seeing 10 heads in a row is $2^{-10} = \frac{1}{1024} < 0.1\%$. Thus, we can say that we reject the null hypothesis at a confidence level $>99.9\%$. Of course, it is possible to mistakenly reject the null hypothesis (which is the point this xkcd comic is making), but the probability of doing so is, as calculated, $< 0.1\%$.