A 555 timer IC is an easy and common way to do what you are describing.
Below is a method which is more or less equivalent.
When the input goes high, the capacitor begins to charge. After a second it reaches about 1.4 V. The darlington array turns on, energizing the relay coil.
When the input goes low, the capacitor takes a second or two to discharge, resetting it for next time.