Normally you will consume a web map hosted in ArcGIS Online by one of the many templates or solutions ArcGIS Online offers. The moment you start modifying or extending functionality you will most likely download the template or solution and host it on your web server.
Can you elaborate a little more about what you specifically need in terms of funcionality?