The countries this regulation applies to are:
The free visa is available at Jakarta airport, Bali airport, and a number of others, shown in the image below.
When you arrive at the airport you can proceed straight to the immigration counter and do not need to obtain a visa. You will need to leave Indonesia within 30 days of landing, with the day of arrival counted as 1 full day, even if you arrive at 11.55 pm.
Once you have passed by immigration it is not possible to apply for a visa to stay longer in Indonesia, you will need to leave and return.