I don't have an example file right now, but here's the basics.
There's a few different ways to do it depending on your game, so here one way.
If you want your character to automatically pick up the item when they walk over it then you simply need to use the event "On collision with other object" and pick the player object as its target.
If you want the player to also have to press a button to pick up the item, then add the keyboard object to your layout, and right click the "on collision with player" event you just created and choose "add another condition" and pick "keyboard" -> on key pressed ->"B"
So now the action associated with overlapping the weapon on the ground will require the "B" button to also be pressed in order to execute the action.
Now for the action. Depending on how you want to make your game, you could do a few different things.
1- the player has its weapon's built into its animation sprites already, and you simply need to switch to a different frame (eg one with him holding his gun) in which case you would use the "set animation" action
2- The weapon item "pins" itself to the player and follows him wherever he goes. In which case, you need to add the "pin" behaviour to the weapon, and use the "pin to object" action.
3- Lets say the player always has the same gun, but just fires different bullets depending on which item his picked up. In this case, you would create a instance variable for your player called "currentGun" or something. And for your weapon pickup action you would use the "set value" action to change the player's variable to 1 or 2 or 3 or whatever. Then you could create an event on the player that checks which value that instance variable is, and switch the animation or damage or graphics of the gun to whatever you want.