OEM Stands for Original Equipment manufacturer, which means that the factory makes a product based on designs that the client provides. A number of popular brands do not have their own factories but they do have their own designers and hence seek out OEM factories.
When you enter into an OEM arrangement with a factory, the Client is expected to provide a detailed product spec sheet and their own product design to the factory to make. There are various degrees of OEM that exist, ranging from using a product that the factory already makes with significant customizations such as changes to shape and dimensions, or to full-on designing a nearly new product. If you are creating a new product that does not exist on the market, then your arrangement will likely be contract manufacturing.
With many OEM projects, it is necessary to create custom molds or another tooling to make the item. These have to be made before production starts and the cost is almost always paid for by the buyer. Since the buyer is also designing the product and created in the product spec sheet they are much more likely to own the Intellectual property. In addition, since the buyer is also paying for the tooling and molds, they own those parts of the production and they can have contracts that prevent the manufacturer from using them for other clients.