More precisely: If $G$ is a (linear) algebraic group over a field $k$, and if $V$ is a finite dimensional linear representation of $G$ as $k$-algebraic group ("rational repr"), one can consider the group $C^i(G,V)$ of all regular functions $$\prod^iG=G \times \cdots \times G \to V;$$ using the "usual" boundary mappings for group cohomology, $C^\bullet(G,V)$ can be viewed as a complex. The key feature is that the cohomology of the complex $C^\bullet(G,V)$ coincides with the derived functor cohomology of $V$ in the category of rational representations of $G$. (I'm suppressing here the correct definition of $C^\bullet(G,V)$ for infinite dimensional rational representations $V$ of $G$).
This point of view makes (more?) clear how this "algebraic" cohomology can diverge from "ordinary" cohomology. Consider e.g. the additive group $G = \mathbf{G}_a$ over $k$, and consider the trivial repr. $V = k$. The algebraic cohomology $H^1(\mathbf{G}_a,k)$ identifies with the set of additive regular functions $\mathbf{G}_a \to k$; this is 1-dimensional if $k$ has char. 0, while if $k$ has char. $p>0$ this cohomology has a $k$-basis of the form {$T^{p^i} \mid i \ge 0$ } (for a suitable regular function $T:\mathbf{G}_a \to k$). On the other hand, the "ordinary" first cohomology for the group $k = \mathbf{G}_a(k)$ is just the set of all "abstract" group homomorphisms $k \to k$. In general, there are many such homomorphisms which are not regular functions (e.g. take $p$th-roots of the function $T$ in positive characteristic).