How do you take a bike crank off?

Depends on the design.

For some, undo the pinch bolts on the top right and left of the crank then undo the big bolt....should slide off after that.

For some you need to remove the big bolt going into the bottom bracket, then install the correct crank puller and pull the crank off.

If it's an Ashtabula, one-piece crank, you remove the pedals, unscrew the bottom bracket, and thread the crank out through the frame.