Every digital camera, both Point and Shoot and D-SLRs have auto focus. In this mode, the camera will automatically focus on the object in the measuring field (either in the viewfinder or the LCD.
Many cameras also support several modes, like “center/spot” and a few others.
Autofocus does not work in low-contrast situations, such as low-light, bright walls or such. You will need to switch to manual focus in those situations, if the AF light to support the focusing engine does not help.