A bolt carrier on a self loading rifle does the job that your hand would do in a bolt action. That is, it unlocks, opens, closes, and then locks the bolt.
On an AK or AR, gas pushes the bolt carrier to the rear, which simultaneously unlocks the bolt by keyways and keys acting upon each other.
With the obvious exceptions of the M1 Garand and M14, most self loading rifles have bolt carriers.