I think the right answer is that "a unit" (or better, "a dimension," as defined below) is a point in a seven-parameter space whose coordinates are rational numbers. Each "point" in this space (e.g. $\rm J\ mol^{-1}\ K^{-1}$) corresponds to a type of physical quantity (e.g. specific heat capacity), and the rules for manipulating these quantities must be discovered by experiment. Some of these quantities, as WillO writes in another answer, are nice linear vector spaces, like one-dimensional distances. But others aren't, like one-dimensional speeds.
In the International System of Units, the definition of a unit is:
The value of a quantity is generally expressed as the product of a number and a unit. The unit
is a particular example of the quantity concerned which is used as a reference, and the number
is the ratio of the value of the quantity to the unit.
For a particular quantity different units may be used. For example, the value of the speed v
of a particle may be expressed as v = 25 m/s or v = 90 km/h, where metre per second and
kilometre per hour are alternative units for the same value of the quantity speed.
Before stating the result of a measurement, it is essential that the quantity being presented is
adequately described. This may be simple, as in the case of the length of a particular steel
rod, but can become more complex when higher accuracy is required and where additional
parameters, such as temperature, need to be specified.
The standard then defines the seven famous reference quantities:
- the second is the duration required for a certain number of microwave oscillations to occur from cesium atoms mistreated in a particular way
- the meter is the length traveled by light in a certain small fraction of a second
- the ampere is the current associated with a certain number of elementary charges per second through an electrical device
- the kilogram is the mass of an object which interacts in a certain way with a Kibble balance or other such inertia-measuring device
- the kelvin is the change in temperature which results in a particular change in thermal energy
- the mole is a particular size of a collection of things (think "a dozen" or "a baker's dozen" or "a gross," but a somewhat larger collection)
- the candela is the brightness of light with a particular wavelength
Note that, unlike in previous versions of SI, the cesium clock standard is the only particular reference quantity which is definitive. We've gotten rid of the meter rod, the prototype kilogram, and the triple point of undeuterated water:
Instead of each definition specifying a particular condition or physical state, which sets a
fundamental limit to the accuracy of realization, a user is now free to choose any convenient
equation of physics that links the defining constants to the quantity intended to be measured.
We then define the dimension of a quantity by the coordinates of its reference value in a seven-dimensional vector space:
$$
\text{dim}\ Q =
\mathsf T^\alpha
\mathsf L^\beta
\mathsf I^\gamma
\mathsf M^\delta
\mathsf \Theta^\epsilon
\mathsf N^\zeta
\mathsf J^\eta,
$$
where $\alpha$ is the exponent associated with time, $\beta$ the exponent associated with length, et cetera. For most types of quantities, the exponents are small integers or rational numbers.
As WillO writes in another answer,
quantities with some dimensions effectively occupy their own one-dimensional vector space. Lengths (dimension $\mathsf L$) are closed under addition and obey scalar multiplication; multiplying two lengths gives you a quantity in a different vector space $\mathsf L^2$, which we call an area.
Addition and subtraction seem to be defined for some units ... but not for others: 273 K + 273 K is nonsensical.
I don't know that this is the case. The existence of the Celsius scale shows that it certainly makes sense to talk about the difference between two temperatures. Temperature is weird because it's fundamentally a derivative, and it shows up in the denominator of its own definition, too. Frequency is similarly weird, and also involves a denominator. If I play a 440 Hz tone and "add" a 445 Hz tone, I'll hear a 5 Hz "beat frequency," but I generally won't hear anything at 885 Hz.
On the other hand, adding two velocities like
$$ \vec u \neq \vec v_1 + \vec v_2 $$
has been discovered by experiment to be wrong; a more correct rule is
$$ \vec u =
\frac{ \vec v_1 + \vec v_2 }{ 1 + {\vec v_1 \cdot \vec v_2}/c^2}
$$
which arises from treating velocities as a space of "four-vectors" as discussed in your favorite book on special relativity. For things like baseballs and airplanes, the (wrong) linear addition formula for velocity introduces errors starting in about the fourteenth significant figure, so sometimes we forget about its wrongness.
There are a couple of places in the SI where quantities which aren't directly comparable wind up with the same dimension. For example, torque ($\rm N\,m$) and energy ($\rm J$) both have dimension $\mathsf L^2 \mathsf T^{-2} \mathsf M^1$, but they don't really measure the same thing --- this is probably something to do with the radian being officially dimensionless. You might make the same remark about the hertz (for periodic phenomena, which usually get radians in their descriptions) versus the becquerel (for stochastic phenomena).