In certain situations where there is not enough light but not completely dark, the lens might "hunt" (will keep focusing and re-focusing) to try an lock on to a point. In this case, it's best again to switch to manual on your lens. But in really difficult lighting situations, you're better off going completely manuel mode and dial in your f stop and shutter speed; gauge your exposure with the camera's meter.
It's not unusual to go completely manual on lens and camera either
. Just remember that in P, Av, and Tv mode, the camera will be doing most of the guess work for you. Again, there will come times where you "have to take the wheel" because the camera says you can't, when in truth you can but only when on manual
.