Here's what folded code looks like:
So, to unfold a block, simply move the cursor to the block and hit "zO". (All the fold commands begin with "z"). Here's what an unfolded block looks like:
There are many ways to fold code, but the simplest way to enable it is by setting the foldmethod option to indent. This folds code based on its indentation.
If you're looking for syntax-aware folding, you can set fold-method to syntax. This generally takes a little more tweaking to get the right fold behaviour.
Add the following to your .vimrc, to get simple straightforward indentation-based code folding:
" Enable folding by indentation
" Use: zc, zo, zC, zO, zR, zM
" Ctrl-K .3 for ⋯
highlight Folded ctermfg=red
highlight FoldColumn ctermfg=white
For more information about code folding, and to get a list of all the commands, see http://www.vim.org/htmldoc/usr_28.html.