Is anyone can apply H1b Visa? or you should have job in hand can apply?

Anyone can apply H1 Visa or you should have a job in your hand can apply?

Suppose i need for H1 visa, later i am searching job in US. Is it valid?

Kindly help me my queries.

Only employers can file H1B visa for their foreign employees. This means you must have a job with an employer who is willing to file H1B petition for you.

IF you are in India, you will have to get H1B visa stamped (if petition approved) at US consulate in India.