Are you sure that you have copied this correctly? As written, it is almost trivial.
Each singleton set is compact in the standard topology on R.
Take an infinite union of singleton sets, let's say, is an infinite union of compact sets, which is a set of natural numbers N.
Take an open interval, let's say, . Then is an open cover for N, but it has no finite subcover.
You can find other examples in other topological spaces, such as a discrete topology on N.