Can cohomologies always be defined as the quotient of the kernel by the image of a certain operation? For example, concerning de Rham cohomology as explained on the lower part of page 5 here, one considers the vector space of all forms on a manifold $M$, $A_{DR}(M)$ in the notation of the paper (?).
The $p$-th de Rham cohomology is then defined as the quotient of the kernel and the image of the exterior derivative $d$ acting on the space of $p$ and $p-1$ forms respectively as
$$
H_{DR}^p(M) = \frac{Ker(d: A_{DR}^{p}(M)\rightarrow A_{DR}^{p+1}(M))} {Im(d: A_{DR}^{p-1}(M)\rightarrow A_{DR}^{p}(M))}
$$
Can cohomology always be defined as the kernel divided by the image of a certain operation?
What does cohomology mean or "measure" in as simple as possible intuitive terms in the de Rham case but also more generally?
PS: I tried to read wikipedia of course, but it was (not yet?) very enlightening for me ...
 A: A cochain complex $(A^{\bullet}, d^{\bullet})$ is a sequence of abelian groups $\dots, A^{-2}, A^{-1}, A^0, A^1, A^2, \dots$ and group homomorphisms $d^k : A^k \to A^{k+1}$ such that $d^k\circ d^{k-1} = 0$. That is, we have a complex 
$$\dots \xrightarrow{d^{-3}} A^{-2} \xrightarrow{d^{-2}} A^{-1} \xrightarrow{d^{-1}} A^0 \xrightarrow{d^0} A^1 \xrightarrow{d^1} A^2 \xrightarrow{d^2} \dots$$
As $d^k\circ d^{k-1} = 0$, $\operatorname{im} d^{k-1} \subseteq \ker d^k$. Furthermore, as the group $A^k$ is abelian, $\operatorname{im} d^{k-1}$ is a normal subgroup, so we can form the quotient group
$$H^k(A^{\bullet}, d^{\bullet}) := \frac{\ker d^k : A^k \to A^{k+1}}{\operatorname{im} d^{k-1} : A^{k-1} \to A^k}.$$
This is called the $k^{\text{th}}$ cohomology group of the cochain complex $(A^{\bullet}, d^{\bullet})$. 
Note that $H^k(A^{\bullet}, d^{\bullet}) = 0$ if and only if the complex is exact at $A^k$ (i.e. $\operatorname{im} d^{k-1} = \ker d^k$). So we can view $H^k(A^{\bullet}, d^{\bullet})$ as a measure of how close the complex is to being exact at $A^k$ - that is, how close the inclusion $\operatorname{im} d^{k-1} \subseteq \ker d^k$ is to being an equality (the bigger $H^k(A^{\bullet}, d^{\bullet})$ is, the more elements of $\ker d^k$ there are which are not in $\operatorname{im} d^{k-1}$). From this point of view, it seems that considering $\ker d^k\setminus \operatorname{im} d^{k-1}$ is a much more natural thing to do. One problem with this approach is that while $A^{k-1}$, $A^k$, $\ker d^k$, and $\operatorname{im} d^{k-1}$ are all groups, $\ker d^k\setminus \operatorname{im} d^{k-1}$ is not a group whereas $H^k(A^{\bullet}, d^{\bullet})$ is. The group structure is very useful, which is why cohomology is defined as it is.
The example you gave, de Rham cohomology, is the cohomology of the cochain complex $(A^{\bullet}_{DR}(M), d^{\bullet})$ where $d^k : A^k_{DR}(M) \to A^{k+1}_{DR}(M)$ is the exterior derivative. Note that $\ker d^k$ is the set of closed $k$-forms and $\operatorname{im} d^{k-1}$ is set of exact $k$-forms, so $H^k_{DR}(M)$ measures how close the statement "every closed $k$-form is exact" is to being true.
Your first question seems to be: 

Do all cohomology groups arise from taking the cohomology of a cochain complex? 

What it means to be a cohomology group (or more precisely, a cohomology theory) can be defined axiomatically using the Eilenberg-Steenrod axioms.
While there are many different ways of defining a collection of cohomology groups $\dots H^{-2}, H^{-1}, H^0, H^1, H^2, \dots$, some of which are not defined as the cohomology of a cochain complex, there does exist a cochain complex $(A^{\bullet}, d^{\bullet})$ whose cohomology groups are isomorphic to the given ones: just take $A^k = H^k$ and $d^k = 0$, then
$$H^k(A^{\bullet}, d^{\bullet}) = \frac{\ker d^k : A^k \to A^{k+1}}{\operatorname{im} d^{k-1} : A^{k-1} \to A^k} = \frac{A^k}{0} \cong A^k = H^k.$$
A: $\newcommand{\dd}{\partial}\newcommand{\Brak}[1]{\left\langle #1\right\rangle}$To give a more elementary answer intended to complement the existing answers, here are some multivariable calculus-type observations. Throughout, $M$ denotes a compact, smooth manifold of dimension $n$ (possibly disconnected), and differential forms are smooth. Briefly,


*

*$p$-dimensional de Rham coholomogy measures "how many linearly-independent $p$-dimensional real homology classes $M$ contains". (William S. Massey's Algebraic Topology article in the Encyclopedia Britannica gives a clear, geometric introduction to homology.)


If $X$ is a smooth $k$-chain and $\omega$ is a smooth $p$-form on $M$, let
$$
\Brak{X, \omega} = \begin{cases}
  \int_{X} \omega & k = p, \\
  0 & k \neq p,
\end{cases}
$$
denote the "integration pairing". If $X$ is a $(p + 1)$-chain, Stokes's theorem gives
$$
\Brak{\dd X, \omega} = \int_{\dd X} \omega = \int_{X} d\omega = \Brak{X, d\omega}.
$$
With respect to the integration pairing, the boundary operator on chains and the exterior derivative operator on forms are formally adjoint.


*

*A closed form $\omega$ (i.e., with $d\omega = 0$) satisfies
$$
\Brak{\dd X, \omega} = \Brak{X, d\omega} = 0.
$$
In words, the integral of $\omega$ over a $p$-chain bounding some $(p + 1)$-chain vanishes. Consequently, if $X_{1}$ and $X_{2}$ are homologous $p$-chains (i.e., whose difference is a boundary, say $X_{1} - X_{2} = \dd Y$), then
$$
\Brak{X_{1}, \omega} = \Brak{X_{2}, \omega}.
$$

*An exact $p$-form $\omega$ (i.e., with $\omega = d\eta$ for some $(p - 1)$-form $\eta$) satisfies
$$
\Brak{X, \omega} = \Brak{X, d\eta} = \Brak{\dd X, \eta}.
$$
Particularly, the integral of $\omega$ over a boundaryless $p$-dimensional chain vanishes. Consequently, if $X_{1}$ and $X_{2}$ are $p$-chains having the same boundary, then
$$
\Brak{X_{1}, \omega} = \Brak{X_{2}, \omega}.
$$
Via the integration pairing, a $p$-form determines a real-valued function on $p$-chains (with real coefficients). Item 1 says that a closed $p$-form determines a real-valued function on real homology classes. Item 2 says this function is unchanged upon addition of an exact $p$-form, i.e., is constant on de Rham cohomology classes.
A: Cohomology/homology is always defined this way. A chain complex is a vector space equipped with a linear map $d:V\to V$ such that $d^2=0$. This ensures that the image is a subspace of the kernel so that the quotient is defined, and this quotient is the homology of the chain complex.
There are many homology theories, some are closely related and some are completely separate. For instance, de Rham cohomology, singular cohomology, simplicial cohomology, cellular cohomology and Morse cohomology are all isomorphic whenever they all make sense. However, there are plenty of other things, like group homology, Hochschild homology, which have nothing much to do with topology and are purely algebraic. And other theories like Khovanov homology, which is an invariant of knots.
In the case of de Rham, you can think of it as measuring "holes" of certain dimensions. For example, the first de Rham cohomology of the circle is $H^1(S^1)=\mathbb{R}$ and higher cohomologies are $0$, but for a sphere we have a generator in the second cohomology $H^2(S^2)=\mathbb{R}$, so it is detecting the higher dimensional "hole" in $S^2$. The related family of homology theories (singular, cellular etc) all do the same thing.
In general, there's no single answer to what a homology theory is measuring, since they arise in many settings for completely different purposes. And precisely what Khovanov homology is measuring is pretty much an open question.
