Citizens of visa-exempt countries
The citizens of about 170 states do not need a visa to enter Hong Kong. They can spend up to 180 days inside the region without an entry permit. The stay duration depends on what nationality you are. For example, if you are a citizen of the United Kingdom or Macau, you can stay in Hong Kong for 180 days, but if you are from India, you can only spend 14 days. The visa-free access can also last 90 days, 30 days, and 7 days for the citizens of East Timor.
One thing that is worth mentioning here is that while India is a visa-exempt country, all Indian passport holders who wish to go to Hong Kong need a pre-arrival registration. If that is the case with you, you need to apply for such a document before you leave. You can [apply online], and the notification slip will arrive via e-mail in as little as 15 minutes, depending on the processing time you select. Print it out before you leave, and you can enter Hong Kong. As mentioned earlier, you can spend only 14 days in Hong Kong. An extended stay requires a trip to the Hong Kong SAR Immigration Department.
As for requirements, just because you do not need a visa, it does not mean you do not need a passport either. You are required to have a passport that is valid for at least another 6 months from your date of arrival in Hong Kong. Other requirements include proof of subsistence and an onward or return flight ticket.
Visa required countries
Apart from the visa exempt countries, the citizens of 19 countries cannot enter Hong Kong without a visa. To acquire such a document, the citizens of those 19 states need to apply for it at the nearest Chinese consulate. The application process should not last long, and you can get your Hong Kong visa in about 4 weeks. Another option would be for you to submit your application to the HKSAR Immigration department by post or local sponsor.
The requirements for a consular visa are similar to the ones imposed for visa-exempt nationalities. You need a valid passport that maintains its validity for another 6 months, proof that you have the funds to provide for yourself while in Hong Kong, and an onward or return flight ticket.
The bottom line is that Hong Kong has a pretty lenient visa policy, and most people can travel there without a visa as long as they do not exceed the allowed period of stay. If you want to transit the country, you do not need a visa either as long as you do not leave the airport premises. However, that is not always the case. Some nationalities require a visa even if they have no intention of stepping out of the airport transit area. Make sure that before you leave, you do the proper research to find out precisely what is required of you.