Dropped weapons contain ammo. Walking over a dropped weapon automatically adds its ammo to your inventory (but only if you are carrying the identical weapon). If the dropped weapon is not the same as the one you are holding, you can opt to exchange it for your weapon by pressing
or
while standing over it. You can also replenish your ammo at the Arms Dealer’s weapon van.