How is it possible to do a master's and PhD program at the same time?
In the US, in many fields, it's common to enter a PhD program with just a bachelor's (and typically, someone who does that can earn a masters along the way to a PhD.)
I did this myself - I am an electrical engineering PhD student with only a bachelor's degree.
In addition to the other noted answers, sometimes it's possible to actually be in multiple graduate programs simultaneously if you obtain admission to one while in the other.
For example, I did not get into my Ph.D. program when I first applied, but did manage to get into the M.Eng. program, which had a separate and much easier application process. While in the M.Eng. program, I applied to the Ph.D. program again and was admitted. My second year of M.Eng. was thus also my first year of Ph.D. All of the human administrators dealt with this as fairly routine, but I had some difficulties with the computerized systems from time to time.