1. How does one produce a prototype? e.g. if you're in need for some custom part - do you contact to some manufacturer/factory, provide them some CAD files, etc... ?
2. Same question if you decide to produce a batch - where/how do you approach manufacturers/factories?
Also, how to make sure you are not going to be ripped off - e.g. those manufacturers can just produce your product and sell by themselves?
As for protecting yourself. Any prototype house worth anything should be willing to sign a non-disclosure agreement. They aren't in the business of ripping off their customers. That is a good way to kill their core business and spend a lot in legal fees.
Now, is your custome part a mechanical part or electrical like an IC? Your product is likely to made up of a bunch of off the shelf parts with a tiny bit of your "secret sauce". The secret sauce could be mechanical, electrical, software or some combination. Your goal at first is to prove out that part. Often this is done using develepment boards all cludged together to something that looks nothing like the final product, but demonstrates the concept. Then it is the next step to create more custom parts (PCBs, 3D printed case, etc.) so it can be prototyped in something closer to its final form.
Yes.
There are a wide variety of shops, and I am just talking here about proto-typing.
If you just want some metal tool plate precisely cut/drilled/tapped to specification (CAD drawings), there's a bunch of shops that specialize in prototype runs. I've used emachineshop.com, it was super easy and the results were exactly to spec. I like to design assemblies with such custom plates using 8020 extruded channels (8020.net) that can be ordered in cut/tapped sizes. Usually overkill and not appropriate for a finished product, it's heavy and expensive, but very customizable and robust. Perfect for few-of-a-kind builds or system-integration work.
The same thing goes for sheet metal fabrication and front panels. There's frontpanelexpress.com, they make front panels precision cut/finish and with whatever graphics you want.
For basic PCB enclosures, I like Hammond Manufacturing extruded aluminum enclosures. They have customization options but I haven't used those (https://www.hammfg.com/electronics/small-case/mods).
If you're serious, I recommend you build some prototypes, see how things go, then partner with experienced folks to go further.
Counter-intuitively, it only gets MORE complex, expensive and time-consuming AFTER the prototypes.