Open pidgin, add an IRC account with the nickname and password you want. For the server, you probably want to use:
When that is done, go to contact > add a chatroom. In this dialog, select your IRC account in the drop down menu. Then, fill in the details, for instance the discussion might be #python. That's it, you'll see the chatroom in your contact list.
Some chatrooms require you to register your nickname. To do that, open the chatroom and type in the following message:
/msg nickserv help register
A new window should open and provide instructions on how to register your nickname.