Complex or hostile environments can sometimes inhibit the movement capabilities of diffusive particles or active swimmers, who may thus become stuck in fixed positions. This occurs, for example, in the adhesion of bacteria to surfaces at the initial stage of biofilm formation. Here we analyze the dynamics of active particles in the presence of trapping regions, where irreversible particle immobilization occurs at a fixed rate. By solving the kinetic equations for run-and-tumble motion in one space dimension, we give expressions for probability distribution functions, focusing on stationary distributions of blocked particles, and mean trapping times in terms of physical and geometrical parameters. Different extensions of the trapping region are considered, from infinite to cases of semi-infinite and finite intervals. The mean trapping time turns out to be simply the inverse of the trapping rate for infinitely extended trapping zones, while it has a nontrivial form in the semi-infinite case and is undefined for finite domains, due to the appearance of long tails in the trapping time distribution. Finally, to account for the subdiffusive behavior observed in the adhesion processes of bacteria to surfaces, we extend the model to include anomalous diffusive motion in the trapping region, reporting the exact expression of the mean-square displacement.