Use a ruler and a pencil to construct a segment of any length on a piece of paper as you see it below

Then, fix your compass opening to a distance somewhat bigger than 1/2 the length of segment AB.

You should open your compass large enough, but make sure that the distance is not more than the length of AB.

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 a line joining the two points where the two arcs intersect.

The point of intersection of the line and the segment shown with a green point is your midpoint