We start by briefly reviewing perfectly conducting boundary conditions in electromagnetism. The degrees of freedom of theory in the case of two parallel plates are explicitly discussed and shown to correspond to those of two massless scalar fields, one with Dirichlet and one with Neumann boundary conditions. They may be combined into a single massless scalar field with periodic boundary conditions on an interval of twice the length of the separation of the plates. The Casimir energy and force at zero temperature is computed. For the finite temperature Casimir effect, the problem is shown to reduce to the computation of the partition function of a massless scalar field on a spacetime manifold of the form T^2\times R^2.