`getWindowHandle()` returns the current window's unique ID (a string). `getWindowHandles()` returns a Set of all open window IDs. You typically iterate through this Set to find and switch to the desired window. The pattern is: store the parent handle before opening a new window, iterate through all handles after a new window is expected, switch to the new handle, perform actions, then switch back to the parent.
getWindowHandle() is like asking 'Who am I talking to right now?' getWindowHandles() is like asking 'Who is in this conference call?' and then selecting who you want to talk to.
How do you switch back to the parent window after closing a child pop-up?