Biological cells are common to live and function under confinement. For example, spermatozoa have to swim through channel-like passages, bacteria need to navigate microporous environments such as soil-covered beaches and river-bed sediments; red blood cells are transported inside micro capillaries. In this talk, numerical simulations of the cellular motions in confinement will be presented in two parts, the first part for a self-propelling micro-swimmer and second for a passively convected deformable capsule. For the micro-swimmer, we develop an accurate boundary element method code to investigate the motion of the model cell, 'squirmer', inside a capillary tube; the radius of the tube is a few times that of the cell. We reproduce its helical trajectories, in qualitative agreement with the experimental observations on Paramecium. For the deformable capsule, we develop a boundary integral method accelerated by general geometry Ewald technique to simulate its motion in a peristaltic tube. We observe that the motion of a capsule depends closely on its deformability; its velocity initially increases with the deformability, after reaching a maximum value, it decreases as the capsule becomes more floppy. A simple physical picture is provided.