How does a moving wall trap work?

If anyone has played Minecraft, or seen any number of movies (Saw 5, for instance) or video games, there's a trap in which either one (or both) wall(s) moves toward the other, or the ceiling lowers until reaching the floor (think Jill Sandwich), resulting in the crushing of anything unfortunate enough to be caught in the middle.
How does this work? What makes the walls move? Wouldn't friction prevent movement of the walls? Etc

I'm sure it is possible given how there are things like trash compactors and car crushers, but I'm looking more at things like a hydraulic press sort of machine in which both presses advance far enough to completely come into contact with each other regardless of what is in between them.

This is something I'm trying to write about and I need help.

Windows 10 has ruined my minecraft

I installed Windows 10 yesterday and ever since my minecraft is not working properly. I can't turn around while I'm running, I have to stop and turn. This is really annoying as I can't play games properly.

I don't have that much money for a computer?

Is there anyway I can get a computer for my son to game on for 250 dollars I'm not that financially set so is there any good computers for my son to play games like Minecraft and team fortress two? Please.

Can I use some ones Minecraft account?

All i want to do is to play minecraft on my computer. My family doesn't have a lot of maney and my mum won't let me have money to buy it.

Recording minecraft with obs makes my frames drop to 1 & 2 and how do I fix it?

So I just Upgrades to Windows 10 & Minecraft fps was really low but they are back up. Now when I record my fps drops to 1 to 3 fps. Without recording it's fine. I have always recorded at the same settings on obs and they've never been bad. So why are my fps so bad now when I record? Is it something to do with Windows 10. Also I just updated Java.