My arduino uno r3 doesnt upload the sketch or erasing the old one

My arduino uno r3 doesnt upload the sketch or erasing the old one it is just blinking the LED , i pressed the reset button and just restarted the sketch , i want to erase the old sketch and upload a new one

What error do you get when you attempt to upload a sketch?

no error shows but only still blinking the led ,rather than excuting my code which includes pir sensor and led , the LED only blinking

Please show your code and describe exactly how you do the upload. I can't think of any reason why you would not get an error on the upload and still not get your sketch to run.