Instructions
Scroll to the "PlayStation Network" icon on the PS3 main menu. Select "Sign In" and enter the email address and password associated with your PSN account. If you don't have a PSN account, select "New Account" and enter the information requested on-screen. After registering, you will be logged in and returned to the PS3 main menu.
Scroll to the "Friends" icon on the PS3 main menu. Select "Add a Friend" and use the on-screen keyboard to enter your friend's PSN account name. Your friend will receive a notification of your friend request and will have to accept the request on their PS3.
Select "Start New Chat" under the Friends icon and select the type of chat you want to have. To play a game together, refer to that game's documentation for specific information on how to invite friends to the game, or, select your friend's account name (after he's accepted you) to see what he's playing and select the "Join Now" option if it's available. This screen also shows you his trophies, bio and other information related to his account.