A worked example: 119.6795 rounded to 2 decimal places
Take the number 119.6795. Rounding it to 2 decimal places, using the ordinary "nearest" convention, gives 119.68 — the third decimal digit (9) pushes the second digit up from 7 to 8. Rounding that same number to 0 decimal places instead gives 120, since 119.6795 is closer to 120 than to 119. Both outputs come from the identical starting number; only the requested precision differs.
The formula: scale, round to an integer, scale back
Rounding to a fixed number of decimal places works by shifting the decimal point, rounding to a whole number, then shifting it back. To round 119.6795 to 2 decimal places, the value is effectively scaled by 100 (to 11967.95), rounded to the nearest integer (11968), then scaled back down by 100 (119.68). The "nearest" direction rounds a .5 case away from zero — the everyday-calculator convention — while "always round up" (ceiling) and "always round down" (floor) ignore how close the number is to either side and always move in one fixed direction.
A second example: rounding 372 and 647 to a nearest multiple
Rounding to the nearest multiple works differently: instead of a decimal-place precision, you choose a step size. Rounding 372 to the nearest multiple of 50 gives 350, since 372 is closer to 350 than to 400. Rounding 647 up to the nearest multiple of 10 — using the "always round up" direction instead of "nearest" — gives 650, even though 647 is closer to 650 than 650 is a stretch either way; the "up" direction guarantees the result never falls below the original value, which is why it's the convention used for quantities like packaging counts or material orders.
Why the direction you choose changes the answer
The same input number can round to different outputs depending on both the requested precision and the chosen direction — 372 rounds to 350 under "nearest," but would round to 400 under "always round up." Picking the wrong direction for the context can matter in practice: rounding a required material quantity down, for instance, can leave you short, while rounding a displayed price down without ever rounding up trends prices lower than they should be over many transactions.