W-algebras appear in at least three interrelated contexts.
Integrable hierarchies, as in the article by Leonid Dickey that mathphysicist mentions in his/her answer. Integrable PDEs like the KdV equation are bihamiltonian, meaning that the equations of motion can be written in hamiltonian form with respect to two different Poisson structures. One of the Poisson structures is constant, whereas the other (the so-called second Gelfand-Dickey bracket) defines a so-called classical W-algebra. For the KdV equation it is the Virasoro Lie algebra, but for Boussinesq and higher-order reductions of the KP hierarchy one gets more complicated Poisson algebras.
Drinfeld-Sokolov reduction, for which you might wish to take a look at the work of Edward Frenkel in the early 1990s. This gives a homological construction of the classical W-algebras starting from an affine Lie algebra and a nilpotent element. You can also construct so-called finite W-algebras in this way, by starting with a finite-dimensional simple Lie algebra and a nilpotent element. The original paper is this one by de Boer and Tjin. A lot of work is going on right on on finite W-algebras. You might wish to check out the work of Premet.
Conformal field theory. This is perhaps the original context and certainly the one that gave them their name. This stems from this paper of Zamolodchikov. In this context, a W-algebra is a kind of vertex operator algebra: the vertex operator algebra generated by the Virasoro vector together with a finite number of primary fields. A review about this aspect of W-algebras can be found in this report by Bouwknegt and Schoutens.
There is a lot of literature on W-algebras, of which I know the mathematical physics literature the best. They had their hey-day in Physics around the late 1980s and early 1990s, when they offered a hope to classify rational conformal field theories with arbitrary values of the central charge. The motivation there came from string theory where you would like to have a good understanding of conformal field theories of $c=15$. The rational conformal field theories without extended symmetry only exist for $c<1$, whence to overcome this bound one had to introduce extra fields (à la Zamolodchikov). Lots of work on W-algebras (in the sense of 3) happened during this time.
The emergence of matrix models for string theory around 1989-90 (i.e., applications of random matrix theory to string theory) focussed attention on the integrable hierarchies, whose $\tau$-functions are intimately related to the partition functions of the matrix model. This gave rise to lots of work on classical W-algebras (in the sense of 1 above) and also to the realisation that they could be constructed à la Drinfeld-Sokolov.
The main questions which remained concerned the geometry of W-algebras, by which one means a geometric realisation of W-algebras analogous to the way the Virasoro algebra is (the universal central extension of) the Lie algebra of vector fields on the circle, and the representation theory. I suppose it's this latter question which motivates much of the present-day W-algebraic research in Algebra.
Added
In case you are wondering, the etymology is pretty prosaic. Zamolodchikov's first example was an operator vertex algebra generated by the Virasoro vector and a primary weight field $W$ of weight 3. People started referring to this as Zamolodchikov's $W_3$ algebra and the rest, as they say, is history.
Added later
Ben's answer motivates the study of finite W-algebras from geometric representation theory and points out that a finite W-algebra can be viewed as the quantisation of a particular Poisson reduction of the dual of the Lie algebra with the standard Kirillov Poisson structure. The construction I mentioned above is in some sense doing this in the opposite order: you first quantise the Kirillov Poisson structure and then you take BRST cohomology, which is the quantum analogue of Poisson reduction.
[See Edit below.]
This isn't really an answer, but I believe it is relevant.
Work geometrically, so $k$ is alg. closed. Let $G$ reductive over $k$, and let
$V$ be a $G$-module (linear representation of $G$ as alg. gp.).
If $\sigma$ is a non-zero class in $H^2(G,V)$, there is a non-split extension
$E_\sigma$ of $G$ by the vector group $V$ -- a choice of 2-cocyle representing
$\sigma$ may be used to define a structure of alg. group on the variety
$G \times V$. Here "non-split" means "$E_\sigma$ has no Levi factor".
And if $H^2(G,V) = 0$, then any $E$ with reductive quotient $G$ and
unipotent radical that is $G$-isomorphic to $V$ has a Levi factor.
You can look at the $H=\operatorname{SL}_2(W_2(k))$ example from this viewpoint;
$H$ is an extension of $\operatorname{SL}_2$ by the first Frobenius twist
$A = (\mathfrak{sl}_2)^{[1]}$ of its adjoint representation. Of course, this point of view doesn't really help to see that $H$ has no Levi factor; the fact that $H^2(\operatorname{SL}_2,A)$ is non-zero only tells that it might be interesting (or rather: that there is an interesting extension).
The extension $H$ determines a class in that cohomology group, and the argument
in the pseudo-reductive book of Conrad Gabber and Prasad -- or a somewhat clunkier representation theoretic argument I gave some time back -- shows this class to be non-zero, i.e. that $H$ has no Levi factor.
So stuff you know about low degree cohomology of linear representations comes up. And this point of view can be used to give examples that don't seem to be related to Witt vectors.
A complicating issue in general is that there are actions of reductive $G$ on a product of copies of $\mathbf{G}_a$ that are not linearizable, so one's knowledge of the cohomology of linear representations of $G$ doesn't help...
Edit: It isn't clear I was correct last April about that "complicating issue". See this question.
Also: the manuscript arXiv:1007.2777 includes a "cohomological" construction
of an extension $E$ of SL$_3$ by a vector group of dim $(3/2)(p-1)(p-2)$ having no Levi factor in char. $p$, and an example of a group having Levi factors which aren't geometrically conjugate.
Best Answer
Much of the literature in characteristic 0 is older and may not immediately fit the exact format of your question. But here is a sample:
N. Jacobson's 1962 book Lie Algebras (later reprinted by Dover) discusses in II.5 (and II.11) the Lie algebra structure of a completely reducible linear Lie algebra in characteristic 0. His Theorem 8 shows that the Lie algebra decomposes into its center plus a semisimple ideal. (In the parallel algebraic group setting, the Lie algebra of a completely reducible linear algebraic group in characteristic 0 has this form.) The semisimple or just simple case is really the crucial one for Jacobson-Morozov theory.
In the 1968-69 IAS seminar volume published as Springer LN 131 in 1970, look at section III.4 in Conjugacy classes by T.A. Springer and R. Steinberg; here there are also adaptations to prime characteristic.
R.W. Carter's 1985 book Finite Groups of Lie Type (Chapter 5) has a nice treatment, though he usually works with simple algebraic groups.
There is also a Lie algebra treatment in section 11 of Bourbaki's Chap. 8 in the Lie groups series, supplemented by interesting exercises.
In characteristic 0 the exponential map works well to pass from the Lie algebra to the group, but in characteristic $p$ the Jacobson-Morozov argument only works for large enough $p$. For refinements involving the groups when $p$ is small, there are substantial papers by G. McNinch and D. Testerman in the past decade or so. At any rate, the case $g=1$ or $n=0$ of your question is trivial and can be left aside.
As BCnrd observes, you have to be careful to specify your maps to be algebraic group homomorphisms. In characteristic 0, working with an algebraically closed field isn't so important, but in general you have to treat points of the group over a field with care. (There is a careful study by Borel and Tits of the way abstract group homomorphisms relate to algebraic group morphisms, but you don't want to get into that here.)