For example, memory management can be factored out of your program by running your software in a garbage collected environment. Application servers like Websphere and Tomcat factor out protocol processing and concurrency control. Portals factor our UI design and authentication/authorization. Cron lets you factor out scheduling when your program should run. CICS and transaction monitors factor out the complexity of dealing with transactions. Going even further, operating systems externalize naming, hardware abstraction, physical memory size etc.
Usually, I find that what I'm writing is not that unique. Someone has written something like it before and if I can find some sort of container to run my code then I'll end up writing less boiler plate code myself. Or, if it's a large project it may be worth writing my own container and other people on the project can write code that plugs into the container.