We design machines to do certain operations. We are actually intelligent machines that are capable to perform far advanced tasks than the machines we have created so far. It must be noted here that the machines we create in the future will be able to do tasks comparable to us.
More processing power, improving sensors, computer vision, speech recognition, artificial intelligence, self-awareness etc. are evolving in computers, just the way humans evolved. One day, computers may be self-programmable too and will also be able to reproduce themselves and further "evolve" once we give them sufficient "thinking" capability.
A future robot will be able to reproduce similar robots in the factory. With advancement in nano-technology, in the far future, robots will probably "grow" as we do. Just the way plants reproduce through pollination, birds, fishes, amphibians and insects through eggs, and humans and animals through conception, robots may also follow some programmed trigger to reproduce themselves.
If you are still thinking that our system works so perfectly that only nature (or God, depending upon your belief) could have created it (like food we eat being digested, our antibodies and self-healing mechanism, functions of organs like heart, lungs, liver and kidneys), then think of a self-aware AI controlled cars of the future – how it might think about the functions of its engine, control system, filters, and sensors. Add to it a self-repairing system and you have a machine equivalent to the human system.