What does passing a function to the $() do and where do I find this in the docs?

What does passing a function to the $() do and where do I find this in the docs?

I see that sometimes functions are passed into $(), e.g. $(function() { $('#tabs').tabs(); }). What does this do? Does it just evaluate right away and is just a guard to prevent something from running if jQuery wasn't loaded? Does it evaluate on body load? Those are all my guesses. Where in the docs do I find info about this? Thanks!