We construct a Poincaré map P h for the positive horocycle flow on the modular surface P SL(2, Z)\ H, and begin a systematic study of its dynamical properties. In particular we give a complete characterisation of the periodic orbits of P h , and show that they are equidistributed with respect to the invariant measure of P h and that they can be organised in a tree by using the Stern-Brocot tree of rational numbers. In addition we introduce a time-reparameterisation of P h which gives an insight into the dynamics of the non-periodic orbits. This paper constitutes a first step in the study of the dynamical properties of the horocycle flow by purely dynamical methods.