Just like MSN Messenger in Windows, if you want Pidgin to startup automatically in Ubuntu when you start your computer, you can do this by adding Pidgin to the startup programs list.
To do this open Session Preferences (System -> Preferences -> Session) and add Pidgin to the list (see pic below).
Now every time you start your computer, Pidgin will start automatically. If you want Pidgin to sign into your IM account, make sure your leave your account(s) enabled when you exit Pidgin. That way when Pidgin starts it will sign into those accounts you have left enabled (see pic below).