Hi Atul,
this is a complex mechanism but i will try and simply the answer. if there are multiple devices trying to contend for the air time to transmit data, the random back off timers are different. lets say somehow two clients land up getting access to the channel at the same time there will be a collision and they ll back off again.
there are 2 detection mechanism, one using NAV (layer 1) and other using the duration time in the mac header (layer 2).
let me know if there are follow up questions.