The Fold Unselected command in the Fold menu folds all existing folding ranges that do not span any selected text. If you did not select any text, the Fold Unselected command folds all folding ranges that do not contain the text cursor.
The Fold Unselected command does nothing with the folding ranges that are (partially) selected. Use Fold|Fold or Fold|Unfold to fold or unfold those. Using Fold|Fold Unselected followed by Fold|Unfold makes it easy to see the structure of the whole file while focusing on the part of the file that you’re editing.