Jail. The word slammer comes from the slam of cell doors. The slang is developed by jail birds and low level criminals, other words used for jail include the big house and the cage.
Random highschooler: Yo, are they doing locker checks today.
Other Random Highschooler: Yea bro, why?
Random Highschooler: My locker's full of kush. I'm fucked.
Other Random Highschooler: Shit man your going to the slammer.