In the Auto or 'scene' modes of most cameras you will be prevented from taking a picture if the system decides that there is:
A chance of over-exposure A chance of under-exposure The possibility of camera shake (not all modes though) A failure to focus.
The first two are usually indicated by either the aperture or shutter speed values flashing (or in extreme cases both). Whichever flashes indicates the range that has been exceeded.
Camera shake is normally indicated by the shutter speed flashing even though it doesn't seem excessively slow (the minimum allowable speed can vary according to lens focal length BTW).
A failure to focus is normally indicated by a blinking focus confirmation light and frequently the lens will run through it's entire focus range a couple of times before it gives up...
Chances are it's one of the above that causes the locking up.
If the problem becomes more persistent then switch to one of the advanced PASM modes and see if it continues. The PASM modes will allow the shutter to fire even if the exposure is likely to be 'wrong' or the shutter speed too slow - though the shutter won't release if focus is not achieved unless the camera is set to continuous or manual focus. If the problem still persists under these conditions there is an outside chance that the camera has developed a fault but at this stage I strongly doubt it's more then the auto-modes doing their job and preventing errors...