Steel or cast iron with enamel coating. Steel is thinner and more flexible, also more prone to rusting out, cast iron is thicker, inflexible, and would take a lot longer to rust out.
Which is which is rather obvious if you know the two types, but hard to describe an accurate way to tell if you don't know in text, unless you can feel it move when you push on it (steel.) They sound different when you knock them. Steel is more "hollow and tinny" sounding, while cast iron is not.
Anyway, epoxy-type enamel repair kits are indeed a thing. As with any other "paint" job the preparation is key, as @crip659 has said in a comment. Anything loose, rusted, delaminated must be removed, and the surface prepared as the instructions of the kit require. Otherwise some little pocket of rust behind will tend to peel the patch off from below. I'd also suggest not only respecting, but perhaps as much as doubling the "time to cure after repair before use."
If the tub is steel, the flexibility of the steel works against the patch lasting well, but you can certainly patch it and see how long it lasts before hitting the "rip out & replace the tub" stage of repair. That's the ultimate solution (and if you are doing your own work, considerably cheaper than the "bathtub liner" option, which are horrid thin plastic at an absurd price, and apparently much of that price goes to paying for saturation advertising...)