In the chapter we focus on the basic working principles of the cockroach swarm optimization (CSO) algorithm cockroach swarm optimization. In order to provide a specific anchor for the later discussion, we describe the main algorithmic phases, and outline the original version in the pseudo-code form and provide its source-code in Matlab, and in C++ programming language. To demonstrate the algorithm’s operation step-by-step, we briefly present an application of CSO for numerical function optimization numerical function optimization. Finally, last section summarizes this chapter and contains concluding remarks.