That depends entirely on what location services you have enabled.
Apple have millions of iPhone users around the world and are not that interested in tracking individual users locations constantly to see what you are doing. However if you have enabled feedback to Apple when you setup your phone then it will potentially send location information along with any error logs as this is used by Apple to try and understand circumstances that are causing errors.
If you have locations enabled on things like Find Friends or Photos then yes, Apple will be aware of the locations of photos.
Any mobile or GPS device will have the potential to reveal your location to the manufacturer and potentially law enforcement, depending on the laws of the country where the manufacturer or user is based.
Apples main focus is not to spy on you, but I am sure that just as with Google and everyone else they are interested in where their devices are being used.
If you want to avoid Apple spying on you or individual app makers knowing what you are doing is to go into Location Services in settings and disable the ones that you don't want.