To slam is to close something forcefully and loudly, like when you slam your door angrily, or slam the freezer door quickly so your sister won't see the ice cream sandwiches you bought.
If you slam your finger in the door, it's going to hurt. And, if you slam your backpack onto the table, you may damage your laptop. The word slam implies violence and force. As a noun, a slam is the action or sound of slamming something. There's also a "poetry slam," when poets compete by reciting their work in front of an audience, and slam-dancing, also known as moshing, in which dancers slam into each other.