1. Start on the left and write towards the right:
川 chuān 'river'
2. Start at the top and work down:
三 sān 'three'
Note that the first rule takes precedence over the second. For example in 十 shí 'ten', one writes the horizontal line first and in 王 wáng 'king' one writes the first two horizontal lines first, then the vertical and then the final horizontal.
3. With boxes, like the one surrounding 国 guó 'country', one does the left down stroke first, and then the top horizontal and right downstroke as one stroke.
Then one fills the box (in this case with 玉 yù 'jade').
Finally one adds the final horizontal stroke to close the box.
Using this site one can see animations of characters being written:
Search for the character, select the Strokes tab and click Animate.