In XP Pro, this is done with NTFS permissions (like OLMI suggested). The password protection of a folder or file is provided by the file attributes and user rights set on specific objects.
You can however set up a compressed folder with password protection (by either right clicking on the desktop and selecting New-->Compressed Folder, or (My Computer | File menu | New | Compressed Folder)...you can then open the compressed folder that you want to password protect. On the File menu, click "Add a Password" | In the "Password" box, type the password that you want to use | Type the same password in the "Confirm Password" box, and then click OK.
There's a program called Folder Guard which I believe you can use to actually password protect a folder in XP. You can find it here...
http://www.winability.com/folderguard
If you'd like to learn more about file/folder permissions in XP Home/Pro, I've included a link to a MSKB article which describes permissions in detail...
HOW TO: Set, View, Change, or Remove File and Folder Permissions in Windows XP
The two reference links at the bottom of the page are also very helpful regarding permissions and password-protection.
If you're running XP Home, you can get around the "Simple File Sharing" issue by booting up in Safe Mode (use NTFS permissions to restrict access to a folder). Otherwise, if you don't mind using text interface commands, you can use the
cacls.exe command line tool (located in ...\Windows\System32) in normal mode to modify the permissions.