Your 401(k) salary-deferral contributions are automatically deducted from your paycheck each pay period. Typically, you can choose a percentage of your salary or a fixed dollar amount to be taken each pay period. This money is taken out before taxes are withheld from your paycheck, with the exception of Roth deferrals.
The contributions are invested in the pre-selected fund set by your plan or at the employee's direction into one or more funds provided in the plan. Often times, your employer will "match" your contributions, but are not required to do so. Any earnings in your account will also be tax-deferred.