Cells have different shapes to allow them to interact with their environments and other cells. Some cells have shapes that favor fast movement. Others are shaped in a way that allows collections to grow effectively.
Some cells are relatively stationary. Bacteria, for example, typically stay in one place. However, stationary cells typically reproduce quickly and cover surfaces, so shapes that allow them to spread out easily and grow quickly are generally favored by evolution. Bacteria that move through liquids are often shaped in a way that allows them to move unabated.
Other cells, like paramecium, move on their own to find food and defend themselves. These cells are shaped in a manner that facilitates movement and lets them attack other cells easily. Some of these cells have more aerodynamic shapes; others have larger sizes to allow them to find food more easily.
Plant and animal cells often form structures, and their shape gives them better structural integrity. Skin cells, for example, are shaped in a way that allows them to form strong connections with each other. Other cells are shaped to facilitate certain tasks. Neurons communicate along long paths, and they are designed to make the electrochemical reactions they receive and produce more efficient.