There is a big difference in the two.
Compnay is generally opened where the scale of business is expected to be vast.A lot of legal formalities are to be complied with while starting and running a Company.And for starting a company, at least two people are required.
While in case of a firm, it is preferred for a small to medium scale business.Legal formalities to start and run a firm are almost nil, except for registration.A single person can also start a firm.
Exceptions can be there.You can notice large scale businesses running as a firm or a small to medium scale business running as a company.
Decision solely depends on Entrepreneur, which he finds suitable.
These were the basic differences, for detailed difference google or refer some text book.