.data modifies an object that is stored on an element. That object contains data. Here's the api reference for it:
It is just an easy way to store data on an element. Also, if there are any data-attr="value" attributes on an element, they will automatically become part of the object that is accessed by .data(), as explained at the link above.
-- Kevin