Most short-term visitors to Hong Kong do not need a visa. Visas are only required for citizens of some countries: please check at the Hong Kong Immigration Department:  

If you need more information about Hong Kong Visas, please check the following link. Hong Kong Visas:  

Visiting China requires visas for most visitors, even if they already are in Hong Kong. Visas for China can be obtained from the Chinese Ministry of Foreign Affairs or the China Travel Service (CTS) in Hong Kong (in a couple of days). More information can be found at their site.