Proper piano posture, from bench to fingertips

Piano posture is the way you sit and hold yourself at the keyboard, which covers the bench, how far you are from the keys, your back and what your wrists are doing while you play. When it's off it doesn't usually hurt right away, but after some weeks of practice it tends to turn up as an ache in one of four places.
The reason is fairly mechanical. When you sit out of line, some small muscles end up holding you in place, which is a job the big ones should be doing, and the joints under them get compressed a little every time. It's the repetition that does the damage, so even short practice sessions add up to repetitive strain if the posture is wrong in every one of them.
On the other hand, when the bench is at the right height and the right distance, the notes are simply closer and your hands have less far to go. The pulse is easier to keep steady too, and you'll get a fuller sound out of the same piano, because nothing was in the way.
Posture at the piano bench
Sit on a bench if you can, and skip the chair. Office chairs roll, and the armrests get in the way of your elbows when you reach for the top or bottom of the keyboard. A piano bench lets your arms go anywhere.
How high should the bench be? Put your hands on the keys and look at your elbows.
That is the whole test for piano bench height. A bench that won't go up takes a firm cushion.
Balanced, not braced. Get the distance right and your forearms hover over the keys on their own.
Proper piano hand posture

Proper piano hand posture looks like you're holding a small ball, and the easiest way to find it is to actually pick one up (an orange from the kitchen is fine), hold it loosely and then take it away without moving your fingers.
The wrist does the job of a suspension bridge with a truck driving over it, in that it gives a little under the weight and it still holds.
Piano hand position is about where on the keyboard you put that shape, and for the right hand the first one most people learn is this:
A lot of method books call it C position, and when the melody moves out of those five keys the whole hand moves over with it and keeps the same shape.
Try playing C D E F G slowly with a loose hand, then clench your fingers on purpose and play it again. The second time it comes out louder and clumsier than the first, and you can actually feel where the tightness is.
Arm weight instead of finger force
Piano sound doesn't come from "poking" at the keys.
This is one of the main ways that playing the piano is different than typing on the keyboard.
It comes from the weight of the arm. A piano key goes down under roughly the weight of a hand resting on it, so the arm already has more than it needs. Rested into the keys, that weight travels through the finger into the key and comes out as a fuller note, with no pushing and no jabbing. In chords and in loud passages that is the difference between a hand that is fine at the bottom of the page and one that gave up halfway down.
Pain or a sharp tension is the signal to stop, and the posture is the first suspect, before the technique. Pain is feedback, not something to power through.
Common posture mistakes
The four that sneak in:
None of them announce themselves. A teacher spots every one from across the room, which is the argument for a mirror, or a phone propped on the music stand, when there is no teacher. Every few minutes: wiggle the shoulders, reset the sitting position, ask whether it still feels balanced. A passage repeated in a slump is a slump being practiced along with the notes.
Making posture automatic
The first week or so is a bit annoying, because you'll fix your wrist in bar 2 and then fumble the chord in bar 3, since posture and notes are both asking for your attention at the same time. That wears off over a few weeks, in the same way you stop noticing a new chair after a while.
You don't have to check constantly. Once when you sit down to a piece is enough, and again whenever you notice your shoulders have crept up toward your ears.
Everyone's posture is awkward at first, and it gets better in stages.