if you need to track friendship events, you could have a friendship_id (say you want a box listing the most recent friendships in the system with a link to details), but if your data model doesn't require that relationship, a multi-column primary key would be just fine. you can create it like so:
create table friend (
user_id int,
friend_id int,
foreign key (user_id) references user(id),
foreign key (friend_id) references user(id),
primary key (user_id, friend_id)
);
there will be an index on both columns individually created by the foreign key constraint, and a multi-column unique index on user_id, friend_id.