To calculate speed you need to know the distance and the time.
To calculate average speed you divide the distance travelled by the time spent.
You measure speed relative to a stationary object.
Distance-time graphs
shows the distance that an object travels in a certaintime. The curve of the line tells you the speed. If the line is horizontal the object is stationary. If the line is a curve the speed of the object is accelerating.