Much like moving through difficult terrain, it costs 1 extra foot of movement for every foot spent moving while climbing. Worse, if a creature is moving in difficult terrain, this movement instead costs 2 extra feet of movement for every foot spent, for a total of 3.
For example, a barbarian with 30 feet of movement speed would only move 15 feet on their turn while trying to climb a mountain. Should that same barbarian try climbing that same mountain during a snowstorm, however, they would instead move only 10 feet.
If a creature has an innate climbing speed listed in their stat block, they move at the listed speed while climbing without having to spend any additional movement, unless moving through difficult terrain. In some extreme cases, such as with spiders or the effects of the Spider Climb spell creatures with a Climbing Speed are even capable of moving horizontally, upside down across ceilings as though they were walking on the floor.
At the DM’s option, climbing a slippery vertical surface or one with few handholds requires a successful Strength (Athletics) check. Meanwhile, ascending a ladder or similar device meant to make climbing easier might cancel out the need to spend additional movement while climbing.