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.