the relation between Homology and Cohomology for a given complex
There's no such thing as homology and cohomology of a given complex: your complex is either a chain complex, and then it has has homology, or a cochain complex, and then it has cohomology. This is just terminology (coming from geometry, where some things naturally form chain complexes and some things form cochain complexes).
So a complex is a collection of objects numbered by $i\in \mathbb{Z}$ and morphisms between them (also known as differentials) such that $d\circ d = 0$.
$$\cdots \to \bullet \to \bullet \to \bullet \to \bullet \to \bullet \to \bullet \to \bullet \to \cdots$$
There are two possibilities:
Differentials decrease the degree: $d_i\colon M_i \to M_{i-1}$. Then $(M_\bullet,d_\bullet)$ is called a chain complex, and we associate to it the corresponding homology $H_i (M_\bullet, d_\bullet)$.
Differentials increase the degree: $d^i\colon M^i \to M^{i+1}$. Then $(M^\bullet, d^\bullet)$ is called a cochain complex, and we associate to it cohomology $H^i (M^\bullet, d^\bullet)$.
Now if we have, say, a chain complex $(M_i, d_i)_{i\in \mathbb{Z}}$, we can define a cochain complex $(M^i, d^i)_{i\in \mathbb{Z}}$ by setting $M^i = M_{-i}$ and
$$d^i = d_{-i}\colon \underbrace{M_{-i}}_{= M^i} \to \underbrace{M_{-i-1}}_{= M^{i+1}}.$$
This is just a formal renumbering of objects and differentials, and it has nothing to do with the nature of objects. After this renumbering,
$$H^i (M^\bullet, d^\bullet) = \frac{\ker (M^i \xrightarrow{d^i} M^{i+1})}{\operatorname{im} (M^{i-1} \xrightarrow{d^{i-1}} M^i)} = \frac{\ker (M_{-i} \xrightarrow{d_{-i}} M_{-i-1})}{\operatorname{im} (M_{-i+1} \xrightarrow{d_{-i+1}} M_{-i})} = H_{-i} (M_\bullet, d_\bullet).$$
(Be careful: when one talks about homology vs. cohomology in geometry, it's not about this renumbering of complexes.)