By contract. The law requires one week after one month employment, convention is probably about four weeks, although varies by sector and role. I think it is legally required to be symmetrical (ie they can't say you must give six months notice but we can fire you in a week), certainly I've never seen an asymmetrical notice period.
I've never looked for serious work other than as a programmer, so it may just be this sector, but yes, it's completely normal that hires can't start immediately. Ninety days is longer than most, but it's not extraordinary. People we've hired into our team typically needed maybe six weeks ? Sometimes they want an actual physical break, like four weeks notice to their previous employer, spend a week on a beach somewhere, then come to the new job.
Particularly if you're poaching people you know the term because you presumably asked them.
It is legal for both employee and employer to offer other terms when leaving, but neither has a right to force the other. One thing that often happens when this is amicable is both agree to shuffle vacation time around, so e.g. say I have 8 days paid leave left, and I'm on 90 day terms, we look at the calendar, maybe the employer agrees we can shove all that paid leave at the end, round a bit and my last working day is here, 75 days, not 90 days. They could force that not to happen, but we're leaving on friendly terms. Of course now I don't have any real leave, but if a new employer wants me ASAP that might be a reasonable trade to start a couple of weeks sooner (note in this scenario I'm getting paid for 90 days still, but money is poor compensation for being tired).