OLS simply works with whatever units you provide in the data. The contribution of predictor $i$ to the linear predictor is $\beta_i x_i$. Any changes in the scale in which $x_i$ is expressed will just result in a proportional change in the value returned for $\beta_i$.
For example, say one of your predictors is a distance, measured in miles, and the outcome is a cost expressed in dollars. The coefficient in OLS would be in units of dollars per mile.
That distance could also be measured in millimeters, with 1609344 millimeters per mile. If you instead do the OLS in those units, the coefficient would be dollars per millimeter.
As the fundamental physical reality doesn't depend on the units of the predictor, the coefficient expressed in dollars per mile would be exactly 1609344 times the coefficient expressed in dollars per millimeter. The fundamental model doesn't depend on the units of the predictor, although the numeric values of the coefficients will differ proportionately to the units.
As methods like LASSO penalize the numeric values of the regression coefficients, this poses a problem. If you use a distance measured in miles, its regression coefficient will be 1609344 times larger than if you measured it in millimeters, and the penalization would depend massively between the two measurement units. Standard practice is thus to start by standardizing continuous predictors by subtracting the mean and dividing by the standard deviation, to obtain predictor values without units. Once penalization is done, you can go back to the original units, or re-express in any other choice of units.