Data Device interview question

What does a resistor do?