I would like to measure the distance between the yellow points in this image:
How can I do it?
My goal is to cut the cube using the plane, but I must set a precise distance between the plane and the square's corner.
You can use the Ruler/Protractor. As of Blender 2.80 the operator was renamed to Measure but it acts like the same way. Good news is that the Measure tool is now directly accessible from 3d View as part of the main Tool Shelf (T) and via ShiftSpacebarM hotkey.
Measure (Blender 2.80) vs Ruler/Protractor (Blender 2.79)
If you hold down Ctrl while dragging the second marker, the cursor should snap to the intersection point in order to measure the correct distance:
With this you can also snap to the edge of the cube and set the desired length:
After that switch into Edit Mode and insert a new Edge Loop (Ctrl+R) into the right spot:
If the section of the cut-off happens to be an isosceles triangle, you can simply use Bevel tool to "cut" precisely.
If both lengths are different, you may consider manually translate or slide one of them after beveling.
Another way to do this precisely is as follow: (I'll try to make a text version asap)
Assuming you want different offsets for both sides, one is 0.5, another one is 0.3:
Another related answer is worth to read: How to set a specific edge length numerically
You could also do a Difference Boolean Modifier. It's fairly straight forward and useful for creating things like holes though solid geometry (windows is one good example).
The great thing here is that it can be done with a few clicks without taking into accounting measuring sides, just position the two objects as you want them to be.
Note: I rarely use the Boolean Modifier until after I'm finished texturing all objects in the scene. This is because the Boolean modifier preserves the Materials and UVs from both objects. This saves me some time because I don't have to spend so much time UV mapping complex geometry and can instead work with more primitive shapes and large, simple UV islands.