The taks is: Show that in every infinite compact space there is a countable subset that is not closed.
At first I read that it should be closed and I had an idea to take a point $x_1 \in X$ and an open set $U_1$ containing $x_1$. If $X/U_1$ is finite then we're done. If not, then it is still compact and we take $x_2 \in X\setminus U_1$ and an open set $U_2$ which should be distinct from $U_1$ and so on... And we would get a countable and closed set.
But I don't know how to do this task. Could somebody tell me how to do it?