The numerical prefix repeats commands in vim, so '5gqq' means '5 times, format line'. The default format will wrap the text to an acceptable level, and 5 lines encompasses the 3 text lines plus the whitespace. The command 'gqq' here is a single one, you can read more with ':help gqq'.
8G moves to line 8, and =G is a command combined with a movement. The = command by default will remove any indentation on these lines, and the 'G' movement means 'to the end of the file'. This will remove the indentation from the 2nd and 3rd lines/paragraphs and the signature.
gg means 'move to top' and >G is another action/movement. > indents lines, and G means 'to the end', so this indents every line by one.
8G moves to line 8, and =G is a command combined with a movement. The = command by default will remove any indentation on these lines, and the 'G' movement means 'to the end of the file'. This will remove the indentation from the 2nd and 3rd lines/paragraphs and the signature.
gg means 'move to top' and >G is another action/movement. > indents lines, and G means 'to the end', so this indents every line by one.
Hope that helps.