It depends on what topology you give on the space X.

For example, if you give a discrete topology on a finite set X, then every open set is compact.

Another example is that every open set is compact in the finite complement topology on .

Meanwhile, if you give a usual topology on , then an open compact set is an empty set only.

If you give a subspace topology on A with respect to the usual topology on , where A is a finite subset of , then every open set in the topological space A is compact.