Here's how it works.
http://lodev.org/cgtutor/raycasting.html
A doom engine is a little more involved and requires BSP trees, more clipping/culling and something closer to actual 3d (floors and ceilings with variable heights, geometry that doesn't fit onto a grid).
Both of the games used 2d sprites for enemies rather than 3d models, so you could draw all of the graphics with paint rather than a modelling tool which would probably be a significant time saver.