For the standard Pen Tool — After pulling a curve, hold down the Alt key and click the last anchor. This breaks the anchor's symmetry. You can then click to create a straight segment, or click-drag to create an un-smooth curve. This is the same functionality as Illustrator only you must hold the Alt key for the click.
For the Freeform Pen Tool — After dragging to create curved paths, hold down the Alt and release the "click". You will see the straight segment. You can then click again, release the Alt key, and continue to draw curved segments.
More detailed info here — see section called "Draw curves followed by straight lines".