To the first question - What are the technologies?
- The form can be generated server-side. The server can distinguish which site/page it belongs to by using the HTTP Referer header. This will allow you also to apply some specifics, based on the target page.
- The form can be generated client side, e.g. using JavaScript. - You provide the site with a small piece of JavaScript to be included into the target page. The script serves as a bootstrap that loads additional JavaScript from the CDN (your server - Content Distribution Network). The downloaded JavaScript renders the form.
I think the client side generation using JavaScript is the most popular. A common approach is to compress the bootstrap JavaScript.
The second concern - How to identify the target page (the submitting page of the form).
In the link/code that you provide to the target page/site, you embed an ID which identifies the page. When the form is submitted, the ID is submitted along with it, so your backend service knows which is the source. Alternatively, you can set a cookie with the page ID (not much popular nowadays). HTTP Referer header can also be used.
The bootstrap JavaScript has access to the current browser URL and can send it to the backend service.
The third question - Is iframe the only choice?
iframe is the most popular choice, since it provides good isolation between the target site and the plugin. It also inherits the security of the backend service. Javascript security zones might not allow your script to run in the context of the target page, while it will run in the iframe, because the origin of the iframe and the JavaScript is the same.
You can however consider rendering plain HTML in the target webpage, or inserting image which on click opens a full page. These are just the options from the top of my head.