Go the FAQ system and search for "Flash programming". A number of FAQs on the subject should show up. You'll have to sift through these for your MCU. Some of them reference Application notes, which document how to use a feature, such as programming Flash, and even provide source code.
---Tom