To clean a baseball cap, you can purchase a commercial product designed specifically for this purpose. It is a basket shaped to hold the cap and you wash it in the dishwasher. Or, you can scrub the cap with hair shampoo using a small brush to remove stains. If the cap is dirty all over, you can wash them in a washing machine. Spray any dirty areas with a prewash spray, wash in cold water, and hang over a large jar or similar object to dry to allow them to retain their shape.