When you include an image in a post or page through WordPress' editor, it automatically wraps the image in an anchor tag pointing to either the image source or a listing of images (i think this is it in your case). To remove the anchor, you can do one of the following:
1- in the HTML editor, you can manually remove the anchor tags around your images.
2- When including images, and you are in your image interface (before clicking on 'insert image' button), you can remove the link value. Putting its value to empty will remove the link.
If you want to edit the template file of those images, check this link. I believe that what you are looking for is attachment.php. Have a look at the other template files types available at the same level of attachment.php in case you want to scope down the template. At the moment, you're either taking in the default attachment.php file or it's defaulting to your index.php.