Some of the best ways to maintain good posture at the office are to use ergonomic office furniture along with being mindful of your posture at all times. Many types of office furniture are not ergonomic, meaning that they weren't designed with comfort in mind. If you can combine the use of ergonomic furniture with making a concentrated effort not to hunch forward or slouch as you work, you shouldn't have any problems maintaining good posture at the office. Being mindful of your posture takes time because it's very easy just to forget that you need to be sitting up straight. In addition to doing these things, you might also want to arrange your computer, mouse, and keyboard on your desk so that you don't have to bend or lean forward to reach them.
When you're trying to select ergonomic office equipment for the purpose of maintaining good posture at the office, the most important piece you need to think about may be your chair. Ergonomic chairs are typically adjustable so that you can raise or lower them to any level you choose. Tables vary in height, and you need to be able to adjust your chair so that your arms and wrists can rest comfortably on yours. The chair you select should additionally have lumbar back support, meaning that at its base it should curve to fit naturally into your lower back. You may also want to look for a chair with arm rests so you can place your arms on them when you aren't typing, which is likely more comfortable than resting them on the computer table.
You should notice how you have your computer equipment arranged on your desk. If it seems that you have to either look up or down to read your computer screen, you might need to adjust it. When you're sitting up straight in your chair, your eyes should be at a level with the screen. Bending your neck up or down to see it properly can put strain on your muscles that might cause you pain at the end of each day. You should also make sure that your keyboard and mouse are sitting close enough to the edge of your desk that you do not need to reach across the table to get to them.
In addition to using an ergonomic computer chair, arranging your computer equipment so that it is easily accessible, and trying to remember to sit up straight, you might also benefit from taking regular breaks. Even if you are maintaining good posture at the office, sitting down for too long is not any better for you than standing in one place for hours. You should get up and walk around for 10 or 15 minutes every hour and a half to give your body a break from sitting.