Hello Adhi,
the commands
switchport voice vlan 10
switchport access vlan 20
in a switch port instructs the switch that vlan 10 is the voice vlan and vlan 20 is the data vlan.
There are no other differences on layer2 vlans.
The switch then can send the information about the voice vlan id to the IP phone using CDP or more recent standards based LLDP.
The IP phone has a built-in 3 ports switch and will use an 802.1Q tag with vlan-id = voice vlan for sending VOIP frames.
The 802.1Q header has an 802.1P three bits CoS that is used to mark packets.
PC frames are received on IP phone PC port and sent untagged to the switch.
In this way QoS can be implemented at the switch port level.
The switch port can use QoS tools to provide better treatment to VOIP frames.
Hope to help
Giuseppe