This is really as simple as it sounds. Find and loot 50 guns, grenades mods, or shields that you don't want to use and sell them to a shop. The vending machines are the shops in this game. You do not have to sell 50 items to a specific kind of vending machine or to a specific one. It is cumulative throughout your gameplay.
In order to make this a little bit faster you can play as the Hunter and use the skill "Ransack" which gives a percentage chance to get additional loot for every kill. In reality this should come very easy in normal play and you will not need the extra loot bonuses.
***
Update: This achievement has been reported to be glitched and not update for some people (myself included). I will update this post when I find a way to correct the issue.
Updatev2: The achievements that glitched for me are unlocking on an alternate character. I haven't sold 50 guns yet for this achievement, but I will update again when I have.
Updatev3: I can confirm that if you had the glitch where you didn't get the achievement on your first character, it is possible to create another character and get the achievement. Hopefully you are not unlucky and have the glitch twice and have to create a third character. So far, my second character has received every achievement that glitched for my first character including this one.