The discovery of as yet nearly 200 extrasolar planets in the last few years has intensified the interest in the question of how planets form and evolve. Several different theoretical models have been developed, whose details only can be advanced and tested with the help of numerical simulations. In this talk, I present our work with one particular numerical method, the so called Smoothed Particle Hydrodynamics (SPH) method, that we are using to investigate certain special aspects of planet formation. In particular, we apply SPH for the simulation of collisions between pre-planetesimals to study the collisional outcome and thereby the impact on the growth from pre-planetesimals to planetesimals, which is crucial for the understanding of the formation of terrestrial planets and the cores of giant planets. Another application is the simulation of the tidal interactions between the protoplanetary accretion disc and embedded planets, which determine gas accretion and radial migration of the planets in the disc.