W-algebras (classical and quantum, finite and affine) play an important role in various areas of mathematics and physics. After a brief introduction to the theory of W-algebras, we will consider the structure of classical W-algebras, and their application to the theory of integrable bi-Hamiltonian systems