The crankset is the guts of the drivetrain. It consists of the pedals, crank arms, chainrings, and the bottom bracket working in concert transferring power from the rider's legs to the cassette and eventually the rear wheel.

The crank arms connect the bottom bracket axle with the pedals. They are manufactured from many materials, such as: aluminum alloy, titanium, carbon fiber, and some steel alloys. The Shimano "Hollowtech" crank arms are made by casting around a hard metal that when removed leave a hollow space, saving on weight.
Crank arms can vary in length, which affects the amount of torque a rider can apply to the drivetrain (in one gear). However, bicycles are built to have many gears and the length of the crank arms is only customized to fit the length of the rider's legs.
There are numerous interfaces which crank arms attach to the bottom bracket. In the old days, one piece cranksets were used. The crankset is threaded through the bottom bracket, and the pedals are attached when it's in the frame. This design is powered by a pin on the crankset sitting in a pinhole on the chainring. One-piece cranksets are hard on the bottom bracket because of the loads being applied differently as it rotates and rolls in-frame.

Most cranksets now are multi-piece, consisting of 2 or 3 pieces, depending if the spindle is independent, or attached to one of the cranks. These disperse the load applied on the spindle by the rider more evenly during use, and results in less maintenance.