1 Place the C4 first
Place the C4 anywhere you want using both L2 and R2.
2 Move away from the area
Move away from the area to make sure you wont get hurt.
3 Make sure you select the C4
You can't detonate the C4 while selecting another weapon. Make sure you select the C4 again if it's not selected. (See Why do people pay to win in Games?)
4 Press L2 + Triangle or LT + Y
Pressing L2 plus triangle ,For PS4, or LT + Y ,for Xbox, will detonate the C4. This will only happen if the C4 was selected as the current weapon. (See Why are mobile games popular?)