You can become a government doctor via the state or the center. For central government job, you can clear UPSC CMS and join in railways/ordnance factory/CHS/NDMC. State governments conduct exams/interviews for the post of MO at various PHCs and other posts too.
You can directly approach the district health officer of the district in which you want to work. He can appoint you on contract basis. If you want it to be a permanent job then you have to be selected by public service commission of that respective state. There will be no separate exam for this.
Many Central government hospital posts are filled by doctors from CHS (Central Health Services). You can check the UPSC website if your want to join CHS. Most state government appoint Medical Officers (for PHCs, CHCs, Sadar hospitals etc.) through their own exams.
Becoming a doctor involves: Good grades in Science A Levels, or a Science Foundation course. A high level of English. A medical degree, recognised by the General Medical Council (GMC) Foundation Training as a Junior Doctor. Specialist Training in specific areas.