That is a mighty vague and broad topic. There really isn't room to discuss it fully in a forum post. The gist of it usually forms the basis of developing a data warehouse. The idea is remove historical data from the OLTP (On Line Transaction Processing) System and store it another system for historical reporting and analysis.
How you do it, all depends.