How can we determined the distance to the epicenter by measuring?

The seismogram indicates the distance from the epicenter. It is determined by the arrival time of the P and S waves. If the earthquake is close to the seismograph, the P waves are immediately followed by the S waves. When the earthquake is further away from the earthquake, the P waves come much earlier than the S waves.