How my ac-dc adapter gives constant voltage and current?
The current rating on a power supply is the maximum current the supply is designed to provide.  The load you connect to the supply will only draw the current it requires.

The supply you mention can deliver up to 500 mA at any of the voltages specified.  The actual current delivered will depend on the requirements of the load.