don't share it. That is by far the easiest answer.
But assuming you have already discounted that, then in truth it is very difficult. I'm taking Windows here and not any other OS for which my knowledge is nil.
That said, here are the things you can try.
1] From Windows XP onwards. password protect your Windows account. Do not forget to password protect the hidden System Administrator account. Passwords must be strong. Weak passwords will not do, such as 1234, names, dates of birth, PIN numbers, telephone numbers. Strong passwords are 10-15 characters long, and a mixture of upper case and lower case letters, numbers and some SHIFT characters like $&£%.
2] Only allow the other user a Guest account, or if necessary a Limited User account.
3] Ensure the browser(s) you use delete all history when you exit the browser(s).
4] Run CCleaner every time you end your session on this computer. Allow CCleaner to delete all history, (as a double check), all cookies, all Temporary Internet Files, all Temp files, and all MRUs.
5] Do not keep any Favorites or Bookmarks. If you must, keep them on a memory stick and import them each time you use the system. Keep the memory stick with you at all times.
6] Use web mail instead of email client software, and ensure your password is a strong one.
Even doing all this, I am guessing that some here will say there are still methods for getting information from the system about your surfing habits.
Mark
Hey guys,
I happen to share my PC and internet with somebody else. I obviously don't want another person spying on me and being able to read my browser history. Not because I love porn, but because I love privacy. What can I do to prevent curious people from spying?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic