CSMA(Carrier Sense Multiple Access) here the transmitter senses the medium before starting with the transmission of packet. Because chances of collision are there. Therefore, the presence of carrier signal is detected from the other node. Because if d two nodes will transmit the packets simultaneously then chances of collision are there.
It has two mechanisms:
i)CSMA CD:Here only Collision Detection is there.
ii)CSMA CA:Here Collision Avoidance is done.