In this paper we derive two a posteriori upper bounds for the heat equation. A continuous, piecewise linear finite element discretization in space and the Crank-Nicolson method for the time discretization are used. The error due to the space discretization is derived using anisotropic interpolation estimates and a postprocessing procedure. The error due to the time discretization is obtained using two different continuous, piecewise quadratic time reconstructions. The first reconstruction is developed following G. Akrivis, C. Makridakis, and R. H. Nochetto [Math. Comp., 75 (2006), pp. 511-531], while the second one is new. Moreover, in the case of isotropic meshes only, upper and lower bounds are provided as in [R. Verfurth, Calcolo, 40 (2003), pp. 195 212]. An adaptive algorithm is developed. Numerical studies are reported for several test cases and show that the second error estimator is more efficient than the first one. In particular, the second error indicator is of optimal order with respect to both the mesh size and the time step when using our adaptive algorithm.