What is the purpose resistors and capacitor in this 555 circuit?
They let the 555 generate the clock pulses for the Johnson counter (the 4017). It's a typical AMV (Astable MultiVibrator) setup. The capacitor gets charged through both resistors until 2/3 Vcc is reached (internal comparator level). This sets a flip-flop which activates the Discharge output (DIS). Through DIS and the potentiometer, the capacitor is discharged until the voltage on the Trigger input (TRI) is 1/3 Vcc, which resets the flip-flop and switches off DIS, so that a new charging cycle starts. So the capacitor voltage swings between 1/3 Vcc and 2/3 Vcc, and each time one of the limits is reached the output toggles.  

  

555 AMVs often have Trigger and Threshold connected. By using a potentiometer to set the Trigger level you can vary the frequency.

It's worth it to study the 555 block diagram and its typical applications, like this AMV or the MMV (Monostable MultiVibrator). The 555 is one of the most versatile ICs around.