The Raspberry Pi camera is manual focus only. It's pretty tolerant of focusing errors, though, so if you set the focus to a good compromise distance, it will probably be sharp enough.
My Raspberry Pi Camera came with a small round plastic tool with a hole in the center that looks like this:
It fits onto the camera lens, and you can adjust the focus by rotating it while pressing down to keep it locked onto the board.
If you lost your focusing tool (or never got one, different suppliers might not provide them), you could carefully use pliers to rotate the lens assembly (the round part with four flanges, not the square part) until it is focused, or buy a focusing tool (Adafruit sells them as "Lens Adjustment Tool for Raspberry Pi Camera").