TITLE: Is homology with coefficients in a field isomorphic to cohomology?
QUESTION [27 upvotes]: is it true that when we compute homologies and cohomologies with coefficients in a field then homology and cohomology groups are isomorphic to each other?
That is valid when homology groups are free with integer coefficients.

REPLY [25 votes]: By the universal coefficients theorem, since a field is a PID, one has:
$$H^n(X;\Bbbk) \cong \hom_\Bbbk(H_n(X;\Bbbk), \Bbbk) \oplus \operatorname{Ext}_\Bbbk^1(H_{n-1}(X;\Bbbk), \Bbbk).$$
But over a field all $\operatorname{Ext}$'s vanish, and thus:
$$H^n(X;\Bbbk) \cong \hom_\Bbbk(H_n(X;\Bbbk),\Bbbk).$$
Now, if the homology groups with $\Bbbk$-coefficients are all finitely generated, then this means that $H^n(X;\Bbbk) \cong H_n(X;\Bbbk)$, because two vector spaces of the same dimension are isomorphic, and the dimension of the dual of a finite-dimensional vector space is the same. But in general, if $H_n(X;\Bbbk)$ is infinite dimensional, then depending on its (infinite) dimension, it may or may not be isomorphic to its dual.
For an explicit example, let $\Bbbk = \mathbb{Q}$, and let $X = \mathbb{N}$ be a countable discrete space. Then $H_0(X;\mathbb{Q}) = \bigoplus_{n \in \mathbb{N}} \mathbb{Q}$, while $H^0(X;\mathbb{Q}) \cong \prod_{n \in \mathbb{N}} \mathbb{Q}$, and the two are not isomorphic – the first has dimension $\aleph_0$, the second has dimension $2^{\aleph_0}$.
So to conclude, in general, you cannot say that $H_n(X;\Bbbk)$ is isomorphic to $H^n(X;\Bbbk)$; but if all the $H_n(X;\Bbbk)$ are finite dimensional, then it is true.

PS:

That is valid when homology groups are free with integer coefficients.

This is only valid if the homology groups are free and finitely generated. Again, same counterexample $X = \mathbb{N}$: $H_0(X;\mathbb{Z}) = \bigoplus_{n \in \mathbb{N}} \mathbb{Z}$ is free, but $H^0(X;\mathbb{Z}) = \prod_{n \in \mathbb{N}} \mathbb{Z} \not\cong H_0(X;\mathbb{Z})$.
(The other answers are not really explicit to answer the question in the title, so here you go.)