Gearlive published a how-to for getting IRC to work on an Apple iPhone.
They use the IRC solution Colloquy.
The solution shows you all the IRC channels available to you, and brings you into the chat room where you can begin typing to others using the iPhone keyboard. You can also pull up a list of people in the room in order to send private messages.
Read the full iPhone IRC guide on Gearlive.