How does android handles permissions in different versions

In a recent article we talked about how you give privilege to apps on install time to gain access to different parts of your android device. Today we're going deeper into how android handles these permissions in the previous 3 android updates : Kitkat (Api level 19 and 20) Lollipop (Api level 21 and 22) Marshmallow (Api level 23).