Spotlight shadow maps are created by projecting the scene with a perspective frustum. This allows the light to radiate out from a single point. This perspective frustum is built using:
- A view matrix originating from the light's position and pointing in the direction of the spotlight
- A perspective projection matrix that encompasses the light volume
In a similar way, directional light shadow maps use an orthographic projection, so the direction of the light is uniform across the map so as to approximate a very far away light source (the sun). The frustum in this case is built unsing:
A view matrix where the direction is parallel to the light's direction; it usually follows the camera around
An orthographic projection matrix that defines the volume to be shadowed
The only tricky part of using a directional light is that it usually cannot shadow the whole scene at once. Instead, you have to use techniques such as cascaded shadow maps (CSM).

With CSM, you have a number of shadow volumes of different sizes that overlap so as to cover the entire viewing frustum. Ideally, they would be sized and placed so that each screen pixel maps to at least one shadow texel while minimizing overdraw.

The colored areas in this image each represent a different shadow volume. The red volume is the smallest and thus has the highest texel resolution, then green, and so on.
This page is more in-depth and should provide you with a pretty thorough understanding of the concept.