I might be wrong...hopefully some one will come along and confirm or correct me.
The one on the left is a Generation 4 magazine. The 2 notches allow for reversing the mag release. This magazine should work in all previous generation glocks too.
The one on the right is a Generation 3, or older, magazine. As long the mag release is on the correct side of the gun, this should still work in the Gen 4 glocks as well as all previous generations.