Can I have car insurance from California in Maryland?

I spoke to a representative of the car insurance from California and she said that it was fine. And that she had many clients from all over the nation. Does anyone know more about this? Thanks!