What steps are performed by a compiler and how many types of compilers are present and used frequently ?