Actually these are two terms which exists during RACH process doesn't has huge difference in functionality. It is just two different scenarios of during RACH procedures, therefore it named explicitly.
For your better understanding i want to explain it from scratch.
Signature: When a User (UE) transmits a Preamble, it has to follow a specific pattern and This specific pattern is called Signature.
As the name itself means Random So UE has to select that specific signature randomly.
a. Contention Based Rach Procedure:
Now it is clear that all multiple UE's can send the PRACH preamble with identical signatures.It means the same PRACH preamble from multipe UE reaches the NW at the same time.. this kind of PRACH collision is called "Contention" and the RACH process that allows this type of "Contention" is called "Contention based" RACH Process.
b. Contention Free Rach Procedure:
There are some cases that these kind of contention is not acceptable due to some reason (e.g, timing restriction) and these contention can be prevented. Usually in this case, the Network informs each of the UE of exactly when and which preamble signature it has to use. Of course, in this case Network will allocate these preamble signature so that it would not collide. This kind of RACH process is called "Contention Free" RACH procedure.