https://fgiesen.wordpress.com/2013/02/17/optimizing-sw-occlu...
(articles 6, 7, 8, others are not closely related)
As far as I know modern hardware has been non-scanline-based for ages btw.
For a 3D renderer, I recommend fgiesen's series as linked above, and the older series by Nicolas Capens: http://forum.devmaster.net/t/advanced-rasterization/6145
In terms of a software rasterizer, which can often be faster, it's just a matter of elbow grease and engineering. Use SIMD. Implement tons of special cases.
Write a simple polygon plotter to get you started -- just fill a triangle with white with simple edge functions. Then work your way up to arbitrary polygons. And then look into the theory behind antialiasing and such.