The primary legal distinction between modular and manufactured homes is that modular homes must adhere to the same local, state, and regional building codes as on-site homes, whereas manufactured homes, must adhere to a federal code established by the Department of Housing and Urban Development (HUD).