Can the Arduino do two things at one time?

I want the (Vibration Switch program) to be or replace the switch in the (Time Delay Led On program).
So if the Piezo Disk, input can be the switch. On or off.