How to take ownership of a file or folder in Windows XP

I keep getting the error message below, so I did a search and found the solution at the link below.

You do not have permission to view or edit the current permission settings for (filename), but you can take ownership or change auditing settings.