Necessary materials:

Measuring tape
Level
Pencil
Steps:

Remove any obstacles from the hole. This includes furniture, curtains and decorations.
Measure the height of the hole. Use the tape measure to measure from the lowest point of the sill to the highest point of the lintel. Measure at three different points (on the sides and in the center)
Measure the width of the gap. Use the tape measure to measure from one side of the window frame to the other. Measure at three different points (top, center, and bottom) and write down the smallest measurement.
Check the squareness of the hole. Use the level to check that the walls and lintel are square. If they are not, you will need to take this into account when ordering the windows.
Measure the depth of the hole. This is important if you are installing windows with built-in blinds.
Write down all measurements. Be sure to write down all measurements accurately, as you will need them to order the windows.
Additional Tips:

It is best to measure the gap twice to make sure the measurements are correct.
If you are not sure how to measure the gap, you can ask a professional for help.
When ordering windows, be sure to specify measurements of the exterior opening, not the existing window frame.
Please leave a clearance of about 5cm around the windows for installation.
Consider the type of opening you want for your windows (casement, sliding, etc.) when measuring the opening.