When you try to join #ubuntu, you might find yourself in the channel #ubuntu-unregged instead. This is because users who are not registered to freenode are redirected there, during times of high spam influx.
Registration establishes a unique identity for users, and requires a valid email address, so it's difficult for spammers to register.
You don't have to register: when you join #ubuntu-unregged, a bot will ask you a very simple question: as soon as you answer it (this way, you show you're a human and not a bot) you can enter #ubuntu.
However, we advise that you register. Your nick is how people know you on IRC. If you register it, you'll be able to use the same nick over and over. If you don't register, someone else may end up registering the nick you want.
All the following commands should be typed in your server tab (it's probably called "Ubuntu IRC"; if you're on irssi, type « /win 1 »), so that if you mistype something, your personal information won't be shown in a public channel.
All the commands given should be typed without quotation marks, without leading spaces, and starting with a slash character (/).
Pick a nickname you like. Set it using the command « /nick your_favorite_nickname ». If that nickname is already taken, the network will inform you of that, and you should try setting a different one.
Type « /msg nickserv register password_of_your_choice firstname.lastname@example.org ». You should pick a decent password, and use a real, valid email address that you have access to.
Check your mail. You should have a new message from freenode, with a command that you should copy and paste into IRC. Do that.
From now on, when connecting to freenode, you should identify using the command « /msg nickserv identify your_nickname your_chosen_password ». If you don't want to have to do this, you can set your password as the server password; how this is done depends on your IRC client.
A note on using using Empathy: If you do not have a conversation window with "nickserv", start one now. "Chat/New Conversation", use the contact ID "nickserv". The commands are almost the same, but do not include the "/msg nickserv" part. So "/msg nickserv register..." becomes just "register...".
More detailed information about registering can be found at http://freenode.net/kb/answer/registration - read that if you want to have more than one nickname.
Are you still asked to register or to answer a question?
This can happen if you are registered, but not identified. Remember to set your password as the server password for your Ubuntu IRC connection, or alternatively to type « /msg nickserv identify your_nickname your_chosen_password » every time you connect, before joining #ubuntu.
If your client joins #ubuntu automatically on connect, it is possible that joining happens just a moment before you are identified. Check your client to see if it can wait a couple of seconds before auto-joining.