You might have faced this problem atleast one time(I am used to it).This problem occurs when u want delete certain file or directory which is being used by the system.There can be many more reasons for it.Some more common messages that pop-up are
"There has been a sharing violation.
The source or destination file may be in use.
The file is in use by another program or user.
Make sure the disk is not full or write-protected and that the file is not currently in use."
One easy way is to delete that folder/file after u reboot.U can delete by booting into safe mode.But, if still u are not allowed to delete it than there is another way to this.Unlocker is an application which has been developed to tackle this problem.Once U install it,than right click the folder u want to delete.
It will show which all application are using it.Just press Unlock all & you are done!