To close a window just click on its CLOSE (red eXit) button, located in the top-right corner of the window. If the window belongs to a program that program will terminate and then release any resources (Graphics, Devices and so on) it was using, so that other programs can then use those resources. For example: Closing a Microsoft WORD 2016 document will close that document's window, and Microsoft WORD 2016 altogether if no other document windows are open, and then release any memory that document and its window was using. Therefore allowing a Paint program or Music program for example to use that, now freely available, memory.
Fig 1.0 - Click on the CLOSE (eXit) button to close a window
Remember: A folder is a window, a file requester is a window, a program has a window and so on. So by clicking on a CLOSE button you may be closing a folder, file requester or whatever but at the end of the day you are closing a Window.
Another way to close a window is to use its FILE menu, located in the top-left corner of the window (Fig 1.1 below), and more precisely its CLOSE menu-item. Click on the FILE menu to display its menu-items and then move the mouse pointer down (or up) the menu-items, temporarily highlighting each menu-item as you move downwards (or upwards), until you reach and highlight the menu-item called CLOSE. Now click the left mouse button (left click), whilst the mouse pointer is over the word CLOSE, to close the window.
Fig 1.1 - Click on the FILE menu to display its menu-items
Fig 1.2 - Move the mouse pointer down the menu-items until it reaches the CLOSE menu-item and then left click
Folder windows usually have a CLOSE menu-item and File windows usually have an EXIT menu-item. In the case of File windows, it is up to the programmer what they call their CLOSE/EXIT menu-item. For example: They could call it EXIT PROGRAM or put it in a different language - it is up to them. Another example is that Internet Explorer 11 uses EXIT on its file menu whereas SKYPE Messenger uses CLOSE on its file menu. So do not always expect to see CLOSE, or EXIT.
You can also close a window by using its taskbar icon. If you hover the mouse pointer over a window's taskbar icon in Windows 10 (no clicking) a preview pane will appear that shows you the contents of that window. This is so that you can verify, from the preview pane, what window you are going to close. In this example I am hovering the mouse pointer over an Internet Explorer 11 taskbar icon so that I can see what web pages (Internet Explorer windows) are currently opened.
Fig 1.3 - Hover over a window's Taskbar Icon to bring up a preview pane that displays the window's contents
To close the window, with or without previewing it first, click the right mouse button (right click) when the mouse pointer is over its taskbar icon. Doing so will bring up a context menu (Options menu) for that window (Fig 1.4 below) whereby you then need to select (left click on) the CLOSE WINDOW menu-item in order to close the window. It does not matter if the window is of a custom size, minimized or maximized because you are closing the window using its taskbar icon and not its CLOSE/EXIT button.
Fig 1.4 - Click on the CLOSE WINDOW menu-item to close the window
When a window is minimized and you click on its taskbar icon that window is then either displayed as maximized or displayed at its custom size, as the front most (active) window. So if it was maximized before it was minimized, it will be maximized now. And if it was of a custom size before it was minimized, it will be of that custom size now.
If you have more than one window open of the same type (i.e. two separate Internet Explorer 11 windows, two tabbed Internet Explorer 11 windows or a combination) you will be shown a preview pane for each window when you hover over their one taskbar icon. If you then hover over one of those window preview panes its CLOSE (red eXit) button will appear, and the preview pane will become lighter, whereby you can then click on that CLOSE button to close the actual window associated with that preview pane.
Fig 1.5 - Hover over the I.E taskbar icon to preview the contents of both I.Es - Click on a preview pane's CLOSE button to close its window
In the above example I have two internet explorer Tabbed Windows open - This means two web pages are displayed on separate Tabs (two mini windows) within one internet explorer window, as opposed to displaying those two web pages inside two separate internet explorer windows.
In this next example I have three internet explorer windows open. Two web pages are displayed in one internet explorer window (as two Tabbed Windows) and the other two web pages are displayed in separate internet explorer windows. Therefore using three internet explorer windows instead of four. However, because Windows 10 sees these web pages as four separate tasks/jobs (four separate internet explorer displays) the Taskbar shows them in four preview panes.
Fig 1.6 - 3 internet explorer windows are open but Windows 10 and the Taskbar treat them as 4 tasks and display them as 4 preview panes
When you click on the CLOSE button of a preview pane (Figures 1.5 and Fig 1.6 above), as described above, you are actually closing the window associated with (inside) that preview pane. So in the last example above I am closing the MSN window via its taskbar icon (via its preview pane). The reason I am explaining this is so that you understand better the window terminology (jargon) and have a better understanding of Tab Windows and Preview Panes.
When you close a preview pane (i.e. an internet explorer window) that has Tabbed Windows within it, you will be asked if you want to close all of the tabbed windows within that one window or just close the currently selected window.....that is associated with the preview pane.
Fig 1.7 - Click on the CLOSE WINDOW menu-item to continue
Fig 1.8 - Click on the CLOSE CURRENT TAB button to close only the currently selected (previewed) window
The Taskbar, Taskbar Icons and Preview Panes may need getting used to but once you have familiarised yourself, with practise, you will probably find it easier to close windows using the methods just described.