Best tutorial is available here. Going through that tutorial you will learn 1) How to create twitter application. 2) How to get oauth_token, oauth_token_secret, user_id and screen_name of the authorized user. 3) How to update status using twitter API.