From clothing: Shake out any loose chalk, then put the item stain-side down on a stack of paper towels. Blot the back with a cloth dipped in rubbing alcohol. Rinse with clean water, then rub liquid dish detergent into the stain and let sit for at least 15 minutes before machine-washing.
From carpet: Vacuum up as much chalk residue as possible. Then mix a tablespoon liquid dishwashing detergent with two cups warm water, and use a clean white cloth to blot the stain until it disappears. Sponge with cold water, and blot dry.