By default, Drupal 7 ships with 3 images styles: thumbnail, medium, and large.
For example, I upload a image file ('abc.jpg') with the image field (I assume the field name is called 'image'); while I am creating an "Article" node, the image file will be uploaded and stored in "sites/default/files/field/image/abc.jpg," and a record of this uploaded file is saved into database in the "file_managed" table.
By that time, the medium and large styles versions of "abc.jpg" is not yet created.
The teaser of the "Article" node displays the image field with the medium style.
Then, I navigate to the teaser viewmode of that node for the first time. The medium version of "abc.jpg" is generated, and sits in "sites/default/files/styles/medium/public/field/image/abc.jpg."
The default view is set to display the image using the "large" style.
I view the node using its default view, and the large version of "abc.jpg" is created in "sites/default/files/styles/large/public/field/image/abc.jpg."
Basically, the image upload is quite smart; when an image has been upload, Drupal won't create all the different styles version of that image. Drupal only creates the style of an image when you first browse to the view using that specific image style.
Which functions/hooks are creating the file for the styled images?