Primary succession starts from bare rock, so no soil is present at the start. Over time the pioneer organisms (such as moss and lichen) break the rock and as the organisms die and decompose, the soil builds up.
Secondary succession occurs when in an environment which had a little soil already. It happens when the previous community is lost, such as due to a forest fire