How do you get prescribed Clomid?

How do you get prescribed Clomid from your Dr? Do they have to run test then prescribe it or just prescribe it?