How do floating license keys work when the SM goes offline?

How do floating license keys work when the SM goes offline? Does the license go back to the license pool or not?

Yes, it goes back to the pool, though depending on how the SM goes away, it could take a little time for this to occur. Generally we leverage a trap coming off the AP that indicates a registration of an SM was lost. If you don't have Traps enabled on the AP and/or you have trap routing issues (such as not having the Prizm server IP set as a trap handler address in the AP), then the only way Prizm can detect this is through failed polling intervals. So, if you are seeing significant delays in this, check your settings in your network.