Hi there megfaulkner615,
From your post, it sounds like you're wanting to gain access to photos on an iPhone but may have forgetting the passcode. In order for the iPhone to be accessed by the computer, the screen of the iPhone would need to be unlocked first. If you've forgotten the passcode, you'll need to follow the intructions here: If you forgot the passcode on your iPhone, or your iPhone is disabled
The phone would be erased once restored. If the phone was backed up prior to the passcode being forgotten, you can restore from a previous back up. Instructions are in the link above.
Take care.