Originally in software development, the "alpha phase" started with the first line of code being written (and "pre-alpha" was the research + planning phase before actual implementation).
"Beta" started at the milestone of reaching the point of "feature completeness" - which means everything is finished, no more new things will be added - and it's all about testing and bug-fixing now. That's reason why it was called "Beta-testing".
Beta phase ended the moment the software was finished and finalized (mostly the date of shipping).
After that, the software was called "final" or "stable", or in some rare cases: "gamma".
If you look at games nowadays, then the real beta-phase of a game (the point of feature stop where nothing new gets added afterwards) starts when the release-day patch is finished (at the soonest).
What's generally called "alpha testing", "beta testing" and "open beta testing" is just like three different testing stages, that all happen during the alpha phase of the software.