Settings>Email + Accounts>Add an Account>Advance Setup>Email goes there>Internet Email>Put all the information that was on the link above, and make sure you have it set to IMAP4. You have iCloud on your Windows Phone.
iCloud is a collection of features or applications from Apple. Similar to Windows Live ID (Microsoft Account) - where you have Hotmail, SkyDrive, Messenger, etc, with iCloud you have your Storage, Photos, Mail, Contacts, Calendar.
You only mention adding a IMAP account, which is the Mail component of iCloud. The OP asked if he could sync contacts, presumably simultaneously with real time updating between his/her iCloud enabled devices, be it Windows, Mac, of iOS, and his/her Windows Phone. Adding an IMAP mail account won't do that.
Please don't generalize iCloud's services as "iCloud" without being specific enough, like iCloud Mail, or iCloud Calendar. There are many users who are trying to do something very specific, and generalizations cause confusion.
To the original poster, unfortunately, Apple has the contact sync feature of iCloud Contacts on lock down, and it doesn't seem possible to sync in the way previously described. They do use a LDAP server to do this, but with some proprietary code / tech in the way of the goal. You would have to export your contacts and import them in to Hotmail or gmail to sync them to your phone (or the at&t address book, or exchange, or something that can sync with WP7).