It's a matter of compiling it, seeing what errors there are, fixing some errors (replacing code etc), compiling again, checking the errors, fixing... etc
You gradually work your way through the code trying to get each part to compile without errors. Sometimes it can take a very long time, and sometimes it can be a quick task.