A rift valley is, of course, a valley. It is long and and relatively straight. It runs between two ranges of mountains. The way that rift valleys are formed is by the spreading of geological faults. In other words, a rift valley is formed by the two sides of a fault pulling apart.
Geologically speaking, there are many different kinds of right valleys. In other words, they can be caused by a variety of geological processes. But in general, they are all caused by the crust spreading apart and breaking, with the middle part dropping to form the valley.