Hi,
Your Question is phrased wrong which might be where you are misunderstanding how to use the ID in both iMessages (as the Apple ID) and Add it as a separate Messages Account as a Yahoo ID.
The App is called Messages.
iMessages is just one account you can have Active.
There are two ways to add the ID as the Yahoo ID
One is in System Preferences > Internet Account > Yahoo and tick the Box for Messages (as Eric hints at)
The other is to do it in Messages.
Go to Messages > Preferences > Accounts.
Click the + icon under the list of Accounts
In the pane that gets displayed choose Yahoo.
You will need a proper Yahoo issued ID and not just one that works with that service.
The Password will need to be the one you use at Yahoo and not the one that is probably different you use with Apple.
As your Name it pulls it from the Contacts App.
8:53 pm Tuesday; December 30, 2014
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad