Issues with IR detection

What sort of IR sensor are you using?

How is it wired up to pin 3 of your Arduino?

A simple sketch of your circuit would help us understand what is going on.

Ian