What is the purpose of the resistors in this schematic?
These are called "pull-down resistors". They prevent the inputs to the IC from floating, and thus being in an indeterminate state. The point is to put the inputs in a known state (logic 0) when the switches are open. When the switches are closed the resistors are effectively "overridden" and a logic 1 is applied to the inputs.

If you have an IC with active-low inputs, then you would want pull-up resistors, which pull the inputs up to Vcc until the switch connects the pin to ground.

See this question or this question for more details.