Its called Rubbing Compound. It is usually used on cars with damaged paint due to sun or having minor scratches. It can also leave many scratches if used improperly. It removes a layer of the paint to make it brighter. This can be witnessed by looking at the cloth and seeing the paint come off.
Cars newer than 5 years should just use WAX. No polish even though many pakistanis incorrectly call wax a polish. Wax actually puts a layer OVER the paint thus protecting it from the sun and water.