jquery functions

jquery functions

I'm new to jquery, and I'm a little confused page load tasks and events are placed in:

$(document).ready(function()

Whereas UI elements are placed in:

$(function()

Is the distinction simply that $(document).ready is called whenever an event occurs, whereas $(function() is called inline?

I'd like to get a better understanding of when to use $(function() and if there are any other jquery functions like this I should define.

Thanks,
STeve