Dig footing holes for the deck posts 6 inches deeper than the posts themselves need to be sunk. The posts should be sunk a minimum of 12 inches deep or below the frost line, whichever is deeper. Fill the added 6 inches with gravel. Compact the gravel by tamping it down with one of the posts.
Place a footing form into the footing hole. You can use pre-made concrete forms for this. These may be simple cardboard tubes that you can cut to a desired length. You also can build your own forms by screwing wide planks together to made square tubes.
Mix concrete according to the manufacturer's instructions. Put a post into the footing form in the hole. Use posts that are longer than you need for the deck. Fill half of the form with concrete. Pack the concrete down with your shovel to eliminate air pockets. Fill the form to the brim. After you place the post in the hole, and as you pour the concrete, use a carpenter's level ensure the post remains exactly vertical. As the concrete hardens, it will hold the post plumb. Allow the concrete time to set.
Measure the distance from the ground to the planned height of the bottom of the deck on one of the posts that is adjacent to the house. Make a mark on the post at the desired height.
Place your 2-by-4 board between the marked post and a second post. Using a single nail, attach one end of the board to the marked post, with the top of the board on the line you made on the post.
Stand at the second post and raise the 2-by-4 to a horizontal position, using the carpenter's level to determine when the top of the board is level. Mark the second post at the top of the leveled 2-by-4. Repeat this procedure until all posts are marked, each time nailing the 2-by-4 to one of the marked posts and using it as a guide to mark the level on an unmarked post.
Cut the posts off at the marks. The posts are now level with respect to each other, and the deck they will support will be level.