To obtain a visa, you should apply to a local Chinese embassy or consulate. It will take several days to process the application. If you plan on traveling to Hong Kong before entering China, you may apply for your Chinese visa in Hong Kong.