If you work out hard enough sooner or later you will be sore. A little soreness in the muscles is good as it tells you that you have done your job well.
To build muscle you must tear it down a bit first, then in the rebuilding process it becomes stringer and possible larger as well.
To treat sore areas, people have applied heat or ice. Rested, raised the affected area..and so on.
It is advisable however to get moving again, get the blood flowing back into that area and help the body heal though it's own process.
Rest, Ice, Compression, Elevation does work but is slow and can be avoided by...well read this article and see.
Inflammation which causes the soreness, is a natural event that has healing closely behind it.