Choose some reference point O (or initial point)on XX' and measure the segment OP units (say in cm).
The result will be a real number x, either positive or negative depends upon the direction of OP (to the right or to the left w.r.t to reference point O, if the line is horizontal). The number x is the coordinate of the point P w.r.t O.
The value of x depends on the choice of the reference point, on the choice of the positive direction on the straight line and also on the scale unit. The initial point or the reference point is called the Origin.