How to unlock all files in Windows 7

I am using Windows 7 and I have noticed that some of the files on my system have become locked and now I can’t delete them although I have administrator privileges. These files are not being used by a remote user as they are not shared. What has caused locking of the files and how can I unlock all files in Windows 7?
