When does H1B visa gets effective?

My wife is on H4 visa and is working in a firm. Her company would be applying for her H1B this year. My question is, if she gets H1B visa in the lottery, will her visa status automatically changes to H1B or does she has to travel outside US and get visa stamped to get H1B visa stamp? If its the latter, till how much she can go out of US and get the Visa stamp?

Her employer can file the H1B petition with change of status from H4 to H1B. If approved she doesn’t have to go for stamping.
H1B will be effective 1st October 2022.

Thanks for your reply. If the employer is filing in which you have to go out of country, then will the H1B visa gets effective when you get visa stamped and come to United states with that stamp? And how late the person can travel for visa stamping? If there any time period after receiving Approval notice that person needs to travel?

If H1B is filed with consular processing, and you are present in the US on any other valid non-immigrant status, you can go for stamping any time while your H1B petition is still valid. Your status will change from H4 to H1B at the time you enter back to the US on H1B visa.

Thanks Kalpesh for your answer.