What is the retention policy and how exactly it work?

So how does retention policies map to measurements? If I have 5 RPs and 5 measurements which is applied to which?