As you type, Microsoft Word assumes that any hyphen or space is an acceptable point to flow the text onto the next line or page. However, that may not be a safe assumption. For example, in the screen shot below, a line break occurred in the middle of the date which also happened to correspond with a page break.
Non-breaking spaces would have prevented the foregoing. There are many pieces of text you may want to keep together (without a line or page break in the middle) like case numbers, account numbers, social security numbers or dates. To enter a space that won't allow a line or page break, simply hit ctrl + shift + space bar. If you want a non-breaking hyphen, hit ctrl + shift + - (hyphen). You can tell if a non-breaking space is present by clicking the Show/Hide Button on the Home Tab. Regular spaces show up as dots and non-breaking spaces show up as degree symbols. They don't print, but that's how you can tell if one is present (see screen shot below with non-breaking spaces highlighted).
Here's how the same paragraph looks like with Show/Hide turned off:
Non-breaking hyphens also look a bit different with Show/Hide turned on. In the screenshot below, the first social security number has non-breaking hyphens in it and the second one does not (with Show/Hide turned on).
If a particular word is too long to fit at the end of a line, Microsoft Word will simply move it to the next line. Depending upon the length of the word in question, this can create awkward line breaks. This is where optional hyphens can help. You insert an option hyphen by putting your cursor where you would want to hyphenate (if necessary) and hitting Ctrl + -. If the hyphen isn't needed, it doesn't appear. If Word can use the optional hyphen to create better line breaks, it will. For example, in the section of text below, large gaps appear between some of the words due to the use of the extremely long word Methylenedioxymethamphetamine (also known as ecstasy).
By placing an optional hyphen between the y and m in the middle of the word, all 3 places where the word occurs, the text looks much better as you can see below. The first two instances of the word hyphenated at the optional hyphen although the third appearance of the word didn't require hyphenation. To be clear, there is an optional hyphen in the middle of the 3rd occurrence of the word, but it isn't visible because it isn't needed.
Optional hyphens are visible when Show/Hide is turned on. Below is the same paragraph with Show/Hide turned on so you can see what optional hyphens look like (I highlighted it in yellow).