Basic window sash locks use a circular locking cam as shown in the picture to lock the two sashes together in a wooden window. These sash locks are inexpensive, come in all sorts of colours and styles and are easy to install by the homeowner. Some variations come with keyed locks on them if you are worried about the potential for break and enter in your home. The keyed versions need to be keyed alike if you have many windows and this might be a problem for some of the more inexpensive sash locks. Another problem with keyed window locks is that they may invalidate your home insurance due to the risk of you not being able to find the key to get out during a fire or other emergency.
The sash lock in the picture can be used to replace broken locks on vinyl side slider windows. Many times times the window manufacturer charges an arm and a leg for their own brand but you can easily adapt other brands to fit your windows. You may have to pre-drill new mounting holes in your vinyl windows but this is not difficult if you take care not to drill too close to the glass. These locks are often quite inexpensive compared to manufacturers versions.
The sash lock in the picture is a good choice for an old wood window that rattles in the wind. This style locks the two panels tightly together with a simple turn lock. This style of lock is less likely to shake loose the cam style. Its still very cheap and easy to install by the average homeowner.
This style of sash lock is very useful for aluminum side sliding windows in high rise apartments and condominums. Especially if you have small children and you want to prevent them opening the window far enough for them to fall out. These locks can be slipped over the track behind the opening sash and the screw tightened with a wrench. The window wont be able to slide past the lock.