Make sure that no updates are running in the background and that you don't have any program open that uses yum (like the software center or the synaptic package manager etc). It is possible that yum crashed in the past and the lock file is not deleted, so you will have to delete it manually by force:
- open a command line window (terminal window)
- type the command 'su', press ENTER, and give the super user's password when prompted
- type the command 'rm /var/run/yum.pid'
- close the command line window