It depends on your level of fitness and the gym your at.
A shytty gym will have you wearing gloves and hitting bags within a month or two.
A really shytty gym will have you sparring within 6 months.
A real boxing gym isn't like a fitness gym. They might have you doing workouts and conditioning for months before you actually try on gloves. You gotta be able to handle the conditioning, pushups, jogging, dips. Then they actually get you on the footwork. Learning how to move like a boxer. That in itself is something that takes about 6 months. You should learn your forward steps, your lateral steps, backward steps, then circling. Really about 6 months of those just to get the understanding, then another 6 months of putting it together like a fluid dance. This is without gloves,
Then once you get fluid in that and aren't tripping over your feet, getting winded (which you won't because you should 1-2 years under your feet) then you get the gloves and start learning the proper way to throw punches, and incorporating them in your dance. Once you can keep your feet moving, and throw your punches without tripping, stumbling, stopping (freezing) then you can start hitting the bags and other modalities. Then learn combos. Then they start getting you out there with others.
A lot of people think this is too slow. And they'll quit or find a gym that moves faster, throws them into shyt they aren't ready for and tries to work the kinks out.
Everyone's situation is different.
Edit: and I can speak on it because I went to a gym that cardio and footwork were an afterthought. So for years I learned to throw punches and jump rope and dip, but footwork, long term cardio, defense was after. They were basically looking for hitters. People they could get into tournaments or sign. So if you had that pop or power and were quick with the hands they were very interested in training you. They didn't really mold people that were interested.