Need help about understand api, wp, $ syntax in WordPress plugin script

It’s an Immediately Invoked Function Expression (IIFE) – an anonymous function that executes itself after it has been defined.
The variables at the bottom are taken from the global scope and are passed as parameters to the anonymous function.

So api represents wp.customize,
wp represents wp and
$ represents jQuery inside the function.