How does charging and transforming work?
"What do these differences in voltage an ampere do"

Charging devices requires different voltages and current for two key reasons:

1) The cell type/chemistry...

i.e. the type of cells used in the device. Modern day household items such as mobile phone, laptops tend to be some form of Li-ion chemistry. The voltage required to charge it is dictated by the potential difference required to move charge carriers within the cells, this differs between different cell chemistries. 

2)Battery structure: 

Whilst a mobile phone carries a single cell, lapotops carry several cells ( a battery is a multiplle of cells). The cells can be connected in series and/or parallel configuration, in series the votlages of the cells add up, and therfore so does the votage required to charge them. In parralel the current is split between paralel cells (almost equally, if identical cells are used) therefore a higher overall current is needed to charge the cells effectively. 

"How do the devices or batteries react to the wrong voltage"

1) This comes down to cell chemistry. If too high a voltage is given it forces the cell to saturate in the number of charge carriers, in the case of Li-ion this can cause metal deposits to build up in the cell to such an extent that the cell short circuits itself. (a cell is made of many layers of positive and negative plates to generate a larger surface area for charge carrier transfer). If the cell short circuits the current drawn by the cell will spike causing a massive amount of power to be drawn by the cell. This increase in power generates heat which destabilises the cell chemistr which can lead to thermal run away i.e. the device gets hotter, draws more current, gets hotter still draws more current... and could burst into flames. 

"How does it affect the device and the charging procedure"

well as shown too high a voltage is bad for the device, and therefore when charging battery management systems are used to ensure that the device does not exceed the limit. Too high a current can cause thermal runaway and is also monitored and accounted for. Two schemes of charging exist in terms of li-ion constant voltage and constant current. Constant current is used initially to bring the cell to its peak voltage, and then constant voltage is used to fully charge the cell, the current will drop in this phase as the cell reaches full charge.