How does a first time car buyer get insurance?

I'm thinking about getting a car, used most likely. The question is how do I go about getting car insurance, I'm a first time car buyer btw?

Do I need it before I buy the car?

Am I able to buy it with the car?

How would I go about getting car insurance?

Thanks