Once your iPhone is in recovery mode, your computer will detect it and prompt you to restore the device. This process will erase all content and settings, including the forgotten passcode.
If you lock your iPad using a passcode ... is disabled and won't accept the passcode anymore - you can still unlock it. Unfortunately, you'll need to reset the iPad to its factory-default ...