Hardware for IP Camera Project
This would typically be implemented with an ARM or MIPS application processor with a CSI interface, allowing the processor to connect directly to an image sensor. 

The application processor would contain enough RAM and flash storage (usually SPI flash is used, though NAND or eMMC is common on higher-end units) to boot a small Linux installation. 

The processor would be connected to an IP network using either a WiFi connection (usually using an SDIO, PCI-Express, or USB connection), or Ethernet (which is usually embedded into the application processor, sometimes requiring an external PHY interfaced over RGMII or similar).

Obviously, given the high cost of prototyping this type of product, you're not going to be able to build a one-off prototype cheaper than you'll be able to find a mass-produced IP camera, so if your goal is to save money, quit now while you're ahead. If your goal is to learn about advanced embedded systems, this is a relatively straightforward (though also relatively tedious and unimaginative) project to tackle.