Check out the diagram below to see the polynomial long division. The process is extensive and it's something that takes a while to get. Though with a lot of practice, you can definitely get the hang of it.
Let me know if you have a question with any part of the long division process.