In addition to adding text to shapes, you can also label lines with text. To do this, simply select a line and begin typing. A text object will be created and attached to the line, normally in the center.
This text object will remain attached to line when you move it. It can change its orientation to match that of the line, or it can remain horizontal. You control this in the Text Direction menu on the Design tab.
There are two choices: Along the Line, and Horizontally.
The text is positioned on the line according to the current text alignment setting for the line (not the text object attached to it). You can change this by selecting the line and using the Text Align command on the Design tab.
Using the Text Align menu, you can also move the text above and below the line.
When the text is added on top of the line, the text is automatically given an opaque background that hides the line underneath. You can show the line through the text by selecting the text object itself and changing its fill to "No Fill" using the Fill menu on the Home tab.
You can also change the fill to another color.
You can also change the color and style of the text to match your diagram using the text controls on the Home tab.