Delays are about the worst possible approach you can take, because the computer can do nothing else while delaying.
Study the "BlinkWithoutDelay" example that comes with the Arduino development software to see how to use the system timer (the millis() function) to accomplish what you want.
For a more advanced tutorial, see "how to do multiple things at once".