If there is only one view in the window (one tab), click on the little cross in the upper right corner.
If there is more than one view in the window (several tabs), select the view to be removed first (indicated by bright black letters in the tab and in the foreground). Then click on the little cross in the upper right corner.

Or right-click on the tab of the relevant view and select Remove from the context menu in order to remove a view.
If there is no tab and liitle cross, you can display them by disabling Hide tabs in the View menu.
If you just want to hide a view to save space, the best way is to shift it to another view so it can be in the background as a tab.