Take your ruler and a pencil and construct a segment of any length on a piece of paper as shown below.

Then, you will try to set your compass opening to match the length of segment AB

Take your compass. Make your sure that the pencil is included in it.

Put the needle of the compass at endpoint A and adjust your compass so that the tip of your pencil touches endpoint B

Put the needle of your compass at A and draw an arc

Put the needle of your compass at B and draw an arc

The two arcs should meet as shown below:

Draw the segments from the two endpoints to the point where the two arcs intersect