What does this mysterious selector do?

What does this mysterious selector do?

What's the difference between
$.fn.insertAtCaret = function (myValue) // i saw this in an example, but don't know what it means

and

function insertAtCaret (myValue)  // this doesn't work in his example but is similar to how I name functions

I checked the jquery documentation for selectors but his selector isn't covered, so I don't know how he came up with it.
It seems somewhat similar to jQuery.fn.extend() but he's not using .extend