what’s their function
The documentation is pretty explicit:
SetBool is preferred when you have to transit between animations based on true/false conditions.
For example: If player is not on ground change animation from run to fly and vice versa.
SetFloat is preferred when you have to transit between animations based on numerical value.
For example: When movement speed is less than 0.1 change animation from walk to idle. When its greater than 0.1 change animation from idle to walk. And if its greater than 1, Change animation from walk to run and so on.