The key is to break down the task into discrete steps that you know how to do (or can find out how to do). What you know how to do is based on your experience level.
Let's take your Posterous email example:
Requirements: Accept @posterous.com emails, format and post them on website.
Task 1) Accept the email.
The emails will most likely have to be retrieved from a mail server. You will have to research the API calls to retrieve the emails from your particular mail server. You will also have to figure out how to extract the content from the body of the email (probably another API call).
Task 2) Format the email.
From task 1, you probably have the content sitting in memory somewhere. Format this so it is compliant with step 3...
Task 3) Post the content on the blog.
If you are adding this email2blog feature, you probably already have a mechanism for posting blog posts. Use that mechanism and instead of accepting input from a textarea on your website somewhere, replace it with the content from your step 2.
Now, how do we get from print statements, if statements and functions to accomplish each of the tasks.
Notice how in task 1, I mentioned API calls twice? API calls are essentially functions that someone else has wrote so you can use their functionality. If you know how to call functions, then you can research the correct API call you need to retrieve mail from the mail server.
I didn't discuss much about formatting but if you know how to do String manipulation, then you know how to format. Formatting an html page is an exercise in adding tags such as the <b>bolded text</b>
within your string somewhere.
In Task 3, I mentioned that there was some sort of mechanism to post blogs. If this is an existing blogging platform, you would be familiar enough with this. But if not, then you need to learn about HTTP Post and other web framework related stuff.
If after reading all this you still have no clue what I'm talking about, then I hope I've convinced you that there is no substitute for experience. So just go out there and build something! Don't worry too much about making noob mistakes because every developer was once a noob.