By asserting that the two locks of hair conspired to do something, the author is using the literary device of personification.
Personifications is a literary device which refers to the attribution of a personal nature or human characteristics to something non-human, or the representation of an abstract quality in human form. In other words, personification is a figure of speech where human qualities are given to non-living objects.