The kernel image is compressed to workaround restrictions in some architectures, i386 for example.
Specifically making the kernel fit into the amount of memory available during early boot.
These days, such things are not "needed" (due to UEFI and 64 bit addressing) but, yes you are correct, they can increase the speed of booting. My compressed kernel image is around 11MB and uncompressed it would be much larger (possibly even 20MB+) and would take longer to load. Decompression is faster than drive speed, generally. However even that is less true today with PCIe 4.0 NVME drives.
Some more details that answer both of your questions are available here
As for the how, the kernel can use many different compression algorithms, good old gzip is one, but it also supports XZ, LZ4, and Zstd. There are probably more, but that's the list of the top of my head.