First you should have an account in yahoo.N your friend should also have your id and you should also have his id if you want to add/chat with him just send him friend request and if she/he accepts it then you can chat with your friend
Fist you register with yahoo messenger-you can see the procedure when you open the yahoo site. Your friend also should have similar account.
First of all you should create an account in the yahoo by giving the correct user identifications and then go for yahoo messenger type the id and password. Get into it and start creating your friends list and double click on the friends start chatting enjoy.. Have a nice day bye.