Well, the BlinkWithoutDelay example (File->Examples->2.Digital->BlinkWithoutDelay) would be a good place to start.