What is the difference between these two methods of establishing a variable?
JavaSript
var img = $('#redImage');
jQuery
var $img = $('#redImage');
The have different names (one of them starts with a $ sign, the other does not). That is all. The $ has no special meaning, it is just a character.
Some people use variables starting with a $ as a hint that the variable is expected to have a jQuery object assigned to it. This is much like the Hungarian Notation style of prefixing variable names with letters to indicate the type.
One creates a variable named img and the other creates a variable name $img ... The dollar sign is a perfectly valid character in a variable name.
$that expects the first argument to be a string containing a CSS selector).