Can we prove $H^1(X,\mathbb{Z})\cong Hom(\pi_1(X),\mathbb{Z})$ using torsors? Let $X$ be a topological space, its first cohomology group $H^1(X,\mathbb{Z})$ classifies $\mathbb{Z}$-torsors over $X$. I think they are special kind of infinite sheet covering space of $X$. How can we show $H^1(X,\mathbb{Z})\cong Hom(\pi_1(X),\mathbb{Z})$? Can we also view the right hand side as certain covering spaces? 

In case $X$ has a universal covering, this is easy to prove:
Let $p\colon \hat X \rightarrow X$ be the universal covering. Recall that the group $\pi_1(X)$ acts on $\hat X$ and that $p$ is the quotient map for this action. 
If $f\colon \pi_1(X)\rightarrow \mathbf Z$ is a morphism of groups, then one can let act $\pi_1(X)$ on the trivial torsor $\hat X\times\mathbf Z$ in a diagonal way:
$$
\gamma\cdot(x,n)=(\gamma\cdot x, f(\gamma)+n),
$$
for $\gamma\in\pi_1(X)$, $x\in\hat X$ and $n\in\mathbf Z$. The quotient $(\hat X\times \mathbf Z)/\pi_1(X)$ is a $\mathbf Z$-torsor over $X$. This defines a map
$$
\tau\colon\mathrm{Hom}(\pi_1(X),\mathbf Z)\rightarrow H^1(X,\mathbf Z).
$$
In order to construct a map in the opposite direction, let $Y\rightarrow X$ be a $\mathbf Z$-torsor. Since $\hat X$ is simply connected, the pull-back $p^\star Y$ is a trivial $\mathbf Z$-torsor over $\hat X$. Moreover, it comes equipped with an action of $\pi_1(X)$ lying over the action on $\hat X$. Choose an isomorphism between $p^\star Y$ and $\hat X\times\mathbf Z$. Then we obtain by transport of structure an action of $\pi_1(X)$ on $X\times \mathbf Z$ lying over the action of $\pi_1(X)$ on $\hat X$:
$$
\gamma\cdot(x,n)=(\gamma\cdot x,\phi(\gamma,x)(n))
$$
for $\gamma\in\pi_1(X)$, $x\in\hat X$ and $n\in\mathbf Z$. Moreover, $\phi(\gamma,x)$ is an automorphism of the $\mathbf Z$-torsor $\mathbf Z$ for all $\gamma$ and $x$. Since such automorphisms are discrete, $\phi(\gamma,x)$ only depends on $\gamma$, and is necessarily of the form
$$
\phi(\gamma,x)(n)=f(\gamma)+n
$$
for all $n\in\mathbf Z$. It is clear that $f$ is a morphism from $\pi_1(X)$ into $\mathbf Z$. This defines a map
$$
\mu\colon H^1(X,\mathbf Z)\rightarrow\mathrm{Hom}(\pi_1(X),\mathbf Z).
$$
It is clear that $\mu\circ\tau=\mathrm{id}$ and that $\tau\circ\mu=\mathrm{id}$. It is also clear that $\tau$ is a morphism of groups.
