If you use Twitter via the web, you can simply click the trash can next to that last tweet that had a typo or - *gasp* - you realized all too late shouldn't be public. If you use something like the TUAW favorite Twitterrific from the Iconfactory, however, you're at a loss, as it features no such trash can. Fortunately, Daniel Jalkut (of such fine Red Sweater Software products as MarsEdit, FlexTime and FastScripts) has posted enough embarrassing tweets to warrant the creation of a Twitter undo AppleScript that automates the deletion if your previous tweet, and he is provided it free of charge from the Red Sweater Blog.
By default, all you need is Jalkut's excellent FastScripts product (either the commercial version or its free little brother), and you can simply follow his brief instructions to get set up with a Twitter safety net. Note that if you use external apps like Twitterrific you won't actually see the tweet disappear from your account. However, if you see the delete confirmation that Jalkut's script is designed to display upon successful operation, the tweet should actually have been deleted and you can check your actual Twitter.com account page to be sure.