For this case we can translate the sentence given as:
With what did they cut your hair?
We know that when people go to the hairdresser, they cut their hair with scissors.
Thus, the appropriate answer would be given by:
"With a scissor"
What translated into Spanish would be:
"Con una tijera".
Answer:
¿Con qué te cortaron el pelo?
Con una tijera.