I want to learn everything related to factoring integers, I have no idea what should I study to learn about this, I want to learn and understand all the currently used algorithms, why a polynomial time algorithm seems so hard to find, etc.
Which books (cheap ones are better) cover the topics needed to get into factoring?
You can check out The Joy of Factoring by Samuel S. Wagstaff, Jr.
From the hyperlinked page: