Most passport and ID applications want a specific pixel size and a face that fills a specific share of the frame. Cropping to their numbers is straightforward once you know them.
A United States passport photo is square. A United Kingdom one is not. Head height, background colour and acceptable file size all vary by country and sometimes by document type within a country. Anyone who tells you there is one correct passport photo size is wrong, so start by reading the actual requirements for your application.
The failures are nearly always physical rather than technical. Shadow on the background, hair across an eye, a smile when a neutral expression was required, glasses catching a reflection. No amount of cropping fixes those, so it is worth retaking the photo rather than trying to rescue a bad one.
Get the crop right before resizing. Cropping first and then scaling to their pixel size keeps the framing you chose. Doing it the other way round leaves you cropping a small image and losing detail.
Save the photo at 300 dots per inch and, if you want prints, also make a print sheet. The four by six inch sheet suits a photo printing shop or a photo kiosk, and the A4 sheet suits your own printer. The photos are laid out with thin cutting lines and gaps so they are easy to trim.
When you print at home, print at actual size and turn off any fit to page option, or the photo will come out the wrong size. Measure the printed photo with a ruler against the size the form asks for before you cut a whole sheet.
No tool can promise that. Acceptance depends on the photo itself, the pose, the background and your own country's rules. This gets the dimensions right, which is only one of those things.
You can cut out the background with the erase tool and place the subject on a plain colour, but many authorities do not accept edited backgrounds. Check first.
No. It never leaves your device, which matters more than usual for a photograph of your face attached to an ID application.
You can, but photo paper gives a much better result. Whatever you use, print at actual size so the photo comes out at the right dimensions.