The black cheese-slope is attached to the stud below, and the purple cheese-slope is attached to the upside-down stud above it. The two cheese slopes are not attached to each other, but are held in place by the studs and the other pieces around them.
Cheese-slope techniques have been extensively researched by LEGO fan Katie Walker, who is well known for her cheese-slope mosaics. Her research into the techniques has been used by many other LEGO fans and also published in books.
If you would like to understand the techniques better, I highly recommend the following article by Katie: Cheese-Slope Mosaics: A Tutorial It includes extensive explanation of the techniques as well as pictures with demonstrations.