The value of general Hamiltonian methods in geophysical fluid dynamics has become clear over recent years. This paper provides an introduction to some of the key ideas necessary for fruitful application of these methods to problems in atmosphere and ocean dynamics. Hamiltonian dynamics is reviewed in the context of simple particle dynamics. The non-canonical formalism which is required for fluid dynamics is introduced first in the finite-dimensional case. The Lagrangian and Eulerian formulations of the fluid dynamical equations are then considered, and the method of reduction from Lagrangian to Eulerian form is described. Rotational effects are introduced in the context of the shallow water equations, and these equations are expressed in Hamiltonian form in both Lagrangian and Eulerian variables. Finally, simple balanced systems are derived, in which constraints are imposed on the fluid motion by applying least action principles to Lagrangians modified either by additional terms with Lagrange multipliers or by direct approximation.