You have to adjust your focus from back to front or vice versa. You can buy a rail system that slides the camera back and forth. You have to go slow and maybe use manual focus. Then after taking 10, or so, shots, you stack them.
I'm a beginner myself, but thats how I see it.