The core and back strengthening suggestions are great. Also, stretching the chest (if you have forward rounding shoulders), hamstrings or hip flexors dependent on how your pelvis tips - hams if it tips back (rounded lower back), flexors if it tips forward (exaggerated arch). The most important thing, in my opinion, is being aware of it as often as possible and correcting it. Changing the habit of how you stand or sit is really the most difficult part. I always try to think about it when I'm driving b/c I tend to slouch, round my shoulders and jut my chin out (lovely imagex( ). If you stand a lot, try to keep your weight balance on both feet.
Pilates is also a great way to improve posture but I would only recommend it if you could work w/ an instructor or take a class b/c it is so important to have the proper form. It takes a long time to "get it", it's very instructional.