A profit-sharing plan is a qualified defined contribution plan under which the employer may determine annually how much, if anything, to contribute, and the plan's own formula then allocates that amount among eligible participants. The IRS describes it as a plan under which "the plan may provide, or the employer may determine, annually, how much will be contributed to the plan (out of profits or otherwise)" — and that parenthetical is the whole story about the name. IRC §401(a)(27)(A) is literally headed "Contributions need not be based on profits." A business with no profits at all can make a profit-sharing contribution, and a profitable one can skip it. The label is a historical artifact.
One scoping point prevents most of the confusion in this area. A cash or deferred arrangement — the salary deferral feature everyone calls a 401(k) — cannot stand alone; it must be part of a profit-sharing, stock bonus, pre-ERISA money purchase, or rural cooperative plan. So virtually every 401(k) plan in the country is, legally, a profit-sharing plan with a 401(k) feature bolted on. This page is about the other half of that structure: the discretionary employer contribution that is not a match and not a deferral. Employee deferrals, matching, and the limits that apply to them belong to 401(k) and employer match. (Older material sometimes calls a self-employed person's version a Keogh plan. That label fell out of use once the tax law stopped distinguishing between corporate and unincorporated plan sponsors; the IRS still prints it in places but notes that, because the law no longer draws the distinction, the term is seldom used.)