Some washers are to keep the nut from loosening, but not the one you show.  The kind of washer you show is to present the pressing force of the nut or bolt head over a larger area.
This can be particularly useful when the bolt goes thru soft material.  The bare nut might dig into the material in a unacceptable way, or even punch thru due to the high pressure.  The washer distributes the same force over a larger area, thereby lowering the pressure.
In some cases, the washer is also to allow for easier turning of the bolt head or nut.  If the nut digs into the material a bit, it will be hard to turn, and possibly damage the material if it is turned anyway.  The washer decouples the turning motion of the nut from the material.  The rubbing happens between the nut and the washer, and mostly just a steadily increasing pressure is presented to the material.
Then there are lockwashers, which have a different purpose altogether.  They are deliberately designed to dig into the material and the nut, preferentially in the direction of the nut being loosened.  Ideally this forms a sortof ratchet mechanism such that it requires more torque to loosen the nut than to tighten it.  This will help keep the nut in place.  Lockwashers are usually used in cases where the overall unit will be subjected to vibration or varying loads that could cause the nut to loosen over time.  There is enough friction between a normal nut, the bolt, and the material, that for static loads the nut is not going to undo itself.