More details are here: http://api.jquery.com/ready/
The $ is an alias for jQuery which (jQuery) is a Javascript library.
Plug-ins are usage of the library in a specific fashion which create specific use of the library and extend its functionality.
Some examples of use:
"Regular" jQuery code:
$(function(){
// my jquery code here
});
NOTE: this is an EVENT management which is to say, it executes on the DOM ready event.
Plug-in code:
(function($){
//theplugin code here
})( jQuery );
This allows the use of the $ inside without confusion because it says "assign jQuery to the $ passed in the function($)
$(function(){
//stuff here such as jQuery code
});
as in
$(function(){
$("#mybutton").click(function() {
alert("hi");)
)};
});
Is the same as:
(function($) {
$(document).ready(function() {
$("#mybutton").click(function() {
alert("hi");
)};
})
})(jQuery)
but perhaps not as good as (without the binding (jQuery) at the end), which only comes into play if you use other libraries that use the $.
$ is just a character, thus you can have variables such as:
myvariable = 0;
$myvariable = 0;
my$variable = 0;
Nothing special here, just using another character.
I just so happens that a common use of $ is $ = jQuery; Other libraries use this character as a common shorthand (alias sort of) as well, thus the noconflict and the use of the full name (jQuery).