First Open a browser such safari or google chrome and type : https://iforgot.apple.com/password/verify/appleid#!§ion=appleid enter your name and details to recover your ID
Once you recover the ID please open https://iforgot.apple.com/ and follow the onscreen to recover your password
If you still cannot access to your iPhone then the only solution is to restore which will cause you to lose all data (photos, files, ect...) currently on devices. If you made a backup prior to losing the password, you should be able to restore that.
Here are the steps to restore the iPhone :
1-Download Itunes from : https://www.apple.com/itunes/download/
2-Install itunes and plug in your iPhone to your pc
3-press and hold the home button and the sleep/wake/power button at the same time for 45 seconds until the Apple logo appears, once that appears you can release the buttons
4-iTunes will give message iTunes has detected an iPhone in recivery mode you must restore this iPhone to continue
5-click restore if it does not go through click on the iPhone in the left hand side of iTunes and click restore
6-restore iPhone and now you should have your iPhone back.
Additional Information : https://www.youtube.com/watch?v=Shrc3FeCJEQ