This depends on the country. In the United States, you can generally go directly to a PhD with only a bachelor’s degree, as a master’s program is included as part of the doctoral program.
Elsewhere, you generally need to graduate from a research-intensive master’s degree before continuing to the PhD.