By default, images are inline elements and they can be centered with text-align:center applied to a parent element.
If you have just images (as in a gallery) without any captions you can nest all your images in a div as shown here.
It's always a good idea to keep your inline elements from adjoining block elements. That what the parent div is for, as well as hooking the text-align to it.
If you have image captions you can do something like this with spans and images nested in a <li> with the <ul> as parent.
Reduce your browser window on both of those demos to see the images wrap and center, code is in the page source.