Need some help understanding

Need some help understanding

Hi everyone,

I'm quite fresh when it jQuerry, but from what I gather so far, it seems not that difficult. 
But, I'm still just starting out, and don't want to miss anything important, 
so I'm here with my first ever important question on jQuerry :)

Now, I am going through a course from Lynda.com (jQuery Essential Training), 
and everything so far has been clear. But this last example has me boggled, so please help out.

The code is next:
$("document").ready(function() {
      var leftmargin = 0;
      var border = 3;
            $("#example p").each(function (index, element) {
                $(element).css("border", border+"px solid red")
                          .css("margin-left", leftmargin);
                border += 2;
                leftmargin += 10;
      });
The two boldened items are what I am unfamiliar with, so my questions here are:
      1. What does the "index" function/caller do? In general, and in this specific case.
      2. What is the original purpose and place of the "element" caller?
      3. How does the same "element" relate to $(element) in the written function?
      4. And how are these parts of the code called officially, so I can find them in the docs?

I hope my questions clear, and please don't hesitate to correct me if I used some wrong terms here.

Thanks upfront,
NS