Both work via the public Internet, i.e. not a special APN, like MMS does; they use your regular data APN and accordingly also incur data charges. When you're on Wi-Fi, they use that.
As for who runs the servers: iMessage goes through Apple's servers.
RCS ostensibly goes through a federated network of telco-operated servers. But since almost none can actually be bothered to implement it (they've given up on trying to monetize it, so they have no incentive at all for incurring additional cost deploying and maintaining them), Google runs it for them, via a company they acquired [1].
> Also, if I'm in the SMS messaging app, I expect my messages to be SMS, not internet-based?
Is your SMS app actually called "SMS", these days? I usually see it called "messaging" or similar. In any case, assuming these apps do RCS, it'll be Internet-based.
[1] https://jibe.google.com/