On each fork blade and at the seatstay-chainstay junctions, bikes with thru-axles have a hole rather than an open-ended dropout. On one side, the thru-axle slots into the hole and screws tightly into the threads on the other.
The thru-axle cap threads directly into the wheel hub and through the fork/frame holes, which makes the wheel safe from detaching.