What you're being given is called a discrete space $(X,d)$; where $d(x,y)=[x=y]$ ($[P]=1$ if $P$ is true, $0$ otherwise) is called the discrete metric. Note the set $X$ is assumed to be infinite. For instance, it can be $\Bbb N$, $\Bbb R$.
One can see that every singleton is an open set, since $\{x\}=B(x,1/2)$, say. What can you say about the compact sets in $X$, then? Is $X$ compact? Hint Note $X$ can be covered by singletons.
Spoilers
$(1)$ $X$ is closed, being the ambient space. It is bounded: $X\subset B(x,r)$ for any $x\in X$ whenever $r\geq 1$.
$(2)$ Suppose $F\subseteq X$ is compact. Then $F$ is finite. Reason: cover $F$ by singletons. The existence of a finite cover implies $F$ is itself finite.
$(3)$ Suppose $F\subseteq X$ is finite. Then $F$ is compact. Reason: Suppose $\mathscr C=\{C_\alpha\}_{\alpha\in A}$ covers $A$. Write $F=\{x_1,\ldots,x_m\}$. Since $F\subseteq \bigcup \mathscr C$ there must exist for each $i=1,2,\ldots,m$ an index $\alpha_{i}$ such that $x_i\in C_{\alpha_i}$, so $\mathscr C_0=\{C_{\alpha_i}:i=1,\ldots,m\}$ is a finite subcover.
Conclusion: $F\subseteq X$ is compact if and only if it is finite. Note that $(3)$ always holds in any (topolgical,metric) space, while $(2)$ certainly doesn't: $[a,b]$ is compact in $\Bbb R$ with the usual metric.