This is the Mapbox GL "expressions" syntax. This is a way for Mapbox GL to calculate a dynamic property value. It is a Lisp-style syntax. In the first case you have:
Which is a terse way of saying:
I want to interpolate a value linearly. The value should be based on the
mag property. When
mag is 0, I want the value to be 0. When
mag is 6, I want the value to be 1. Between those two values, perform a linear interpolation.
There is no maximum or minimum value, but it should presumably be a finite number. In this example, if the value of the
mag property was greater than 6, the output value would be capped at 1. Your
heatmap-color property actually demonstrates a more complicated case: using more steps, and colour as the output.
The others are similar, but are based on the special
zoom property (relating to the map's current zoom state).