Mark the corners of the walls onto the slab. To do this, drive wooden stakes into the ground around each corner of the slab. Place one stake directly behind the corner, and one stake 2 feet down the slab on each side. Nail a 2-by-4 board between the corner stake and the ones on the sides of the slab, so that it looks like an "L" when viewed from above.
Tie a string to the center of one of the 2-by-4 boards, then tie the other end of the string to the 2-by-4 directly opposite it in the next corner. Do this in each corner. The spots where the strings intersect mark the corners of the foundation walls.
Lay a corner block onto the slab in all four corners. Position the blocks so that the outer edges are aligned with the strings.
Dry-fit the first course of blocks onto the slab by placing them onto the slab between the corner blocks. Keep a gap of about 3/8-inch between the blocks as you lay them to account for the mortar. If you cannot fit a full-sized block, cut it with a masonry chisel and a hammer. To do this, measure and mark the cut lines onto the sides of the block. Place the chisel against the line, and tap it lightly with the hammer until the block breaks. You don't need a lot of force, as the blocks are hollow. Trim any rough, jagged edges with the hammer and chisel.
Mix mortar for the blocks, following the instructions on the packaging. Apply mortar to the slab in one corner with a trowel. Use enough mortar for the corner block and three cinder blocks, spreading it in an inch-deep layer that is 8 inches wide.
Place the corner block into the mortar, and align the outer edges with the strings. Place a level on top of the block in both directions, and adjust the block to level it out if needed.
Apply a half-inch of mortar onto the side of a cinder block. Place the block into the mortar on the slab, with the mortar-covered side of the cinder block placed against the corner block. Place the level on top of the corner block and the cinder block, and adjust the cinder block to even it with the corner block. Scrape away any mortar that seeped out from the joint between the blocks with the trowel.
Set two more cinder blocks into the mortar, using the same process.
Place mortar and three cinder blocks against the same corner block on the adjoining side, using the same process. Repeat this at each corner.
Apply mortar and cinder blocks on the slab between the blocks you placed in the corner, using the outline of the blocks when you dry-fit them as a guide.
Set the corner blocks for the second course on top of the wall, rotating them so that they aren't placed directly over the corner blocks in the first course. This allows you to stagger the blocks in each row, making the walls stronger.
Set three blocks onto the walls adjacent to the corner block, using the same process you used when setting the corners in the first course.
Set the corner blocks in the other three corners, then lay blocks on the wall between them.
Continue building the foundation using this process until the walls reach the desired height.