I am trying to self study real analysis , and that is when I cam across this doubt .
The way I understand Heine Borel theorem is that , whenever A is contained in union of open sets , then A is contained in the union of finitely many of these sets.
Formally ,if $A \subset\bigcup\limits_{i\in I} G_{i}$ and each $G_i$ is open ,then there exist $i_1,i_2,...i_N$ such that $A\subset\bigcup\limits_{i=1}^{i=N} G_{i}$
Now my doubt arose when I was asked to show that B(x,r) is not compact. ( I get that I could use the later result of using that a compact set has to be closed and bounded to prove it, but I just wanted to work with the Heine Borel theorem here) One of the main reason that I do not get why this set has to be compact is the fact that I don't understand why can't I make a open ball B(x,R) where R>r , which will be an open cover for B(x,r) and obviously then we would have found out a finite open cover for B(x,r) thus making it a compact set ! ( It is safe to imagine that we are talking of the case where the ball exists in $R^n$ metric space )
I know that this doubt should be trivial but for some stupid reason I am just not able to understand this.
In order for a set to be compact, any open cover must have a finite subcover. You have only demonstrated that one open cover has a finite subcover (in fact the cover itself is finite).
For instance, let $U=B(0,r)$ the open ball, and define an open cover of $B(0,r)$ $$\bigcup_{n=1}^\infty B(0,r-1/n).$$ You can show this doesn't have a finite subcover, cause if $n=N$ is the index of the largest ball used in the finite subcover then the union of the subcover is equal to $B(0,r-1/N)$ and thus does not cover $B(0,r).$
We have demonstrated there is an open cover with no finite subcover and thus the open ball is not compact.