A resistor is a fundamental electrical component used to limit or control the flow of current within an electronic circuit. In addition to regulating current, resistors can also be used to set precise voltage levels for active components like transistors, ensuring stable and reliable circuit operation.