Two ways it gets done
There are two tools for jointing and they happen at different points in the schedule. A hand groover cuts a joint while the concrete is still plastic, in the same window as edging, using a tool with a raised fin that presses a groove down to roughly a quarter of the slab thickness. This is the faster of the two methods and it is common on driveways, patios and walkways where the joint layout is simple.
A walk-behind saw cuts joints later, once the concrete has hardened enough to walk on and cut without tearing, generally within the first day after the pour. Saw cutting gives a straighter, cleaner line than tooling and is the more common choice on larger or more heavily loaded slabs, where the layout is often drawn ahead of time rather than judged on site.
Why the timing window is the whole job
Concrete starts developing internal stress from the moment it begins to cure, and that stress has to go somewhere. Jointing gives it a weak line to follow, but only if the joint is cut before the slab cracks on its own. Cut too early, before the concrete has firmed up, and a hand tool tears the edge or a saw blade rips out aggregate instead of slicing it. Cut too late and the concrete has already found its own crack somewhere, usually not where anyone wanted it.
That is why jointing is scheduled, not squeezed in whenever the crew has a free minute. On a hand-tooled joint it happens in the same pass as edging. On a saw-cut joint the crew is back on site within hours of the pour, sometimes the same evening, specifically to make that cut before the concrete decides the layout for itself.
How deep and how far apart
A joint that is too shallow does not weaken the slab enough at that line, and the concrete simply cracks somewhere else instead. The general depth target is about a quarter of the slab's thickness, deep enough to give the crack a real head start along that groove. Spacing follows the thickness too, closer together on a standard 4 inch slab and farther apart on something thicker, since a thicker slab has more mass holding it together between cuts.