A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
(1) The four sections of a custom number format are:
positive;negative;zero;text
(2) An asterisk * followed by a character means: repeat that character as often to fill the cell.
For example the format $* 0.00 will left align the $ sign and right-align the number (with 2 decimal places), because the $ sign will be followed by as many spaces as needed to fill the cell.
(3) An underscore _ followed by a character creates a space the width of that character.
In the example that you mention, negative numbers are enclosed in parentheses ( ). The _) at the end of the section for positive numbers creates a space the width of a ) after the number, causing the last digit of positive numbers to be aligned with the last digit of negative numbers.
(4) There is one other use for square brackets: in a time format, [h] stands for cumulative hours, [m] for cumulative minutes and [s] for cumulative seconds. For example, the format h:mm will display times up to 23:59, but [h]:mm can display 28:04 or 132:45.
See:
http://www.exceltactics.com/definitive-guide-custom-number-formats-excel/
http://exceldesignsolutions.com/a-comprehensive-guide-number-formats-excel/