If you own property with the other person as "joint tenants", there is a right of survivorship. This means that when one of you dies, the other will automatically own the entire property. One owner cannot leave their share to someone else in their will.
On the other hand, if you own property with someone as "tenants in common", each person who owns a portion of the property can leave their portion to whomever they choose in their Will. If they have no Will their portion will be inherited by their next of kin - children, parents, or siblings. This can lead to complicated situations, a Jennifer points out, because while you bought the house with your boyfriend or girlfriend, you could end up owning it with their parents or children. Will they ask you to sell the house so they can receive cash for their share? Will they want to move in with you?!
Before you purchase property with a friend or significant other, be sure to consult with your attorney (you may even wish to each consult with your own attorney) to find out the ramifications of each type of property ownership, discuss the issues and possible solutions, and draft the appropriate documents to protect each of your interests now and in the future.