A shell company is a company that exists but does not actually do any business or have any assets. The most interesting type of shell company (to investors) is one that has a listing. This is a listed shell, and is almost always what is meant by a reference to a shell in an investment context.
Given that it takes time and money to obtain a listing, a listed shell has significant value even if it does not have any assets. Listed shells are therefore often the targets of reverse takeovers.
A listed shell company must have had an active business in the past, or it could not have met the requirements for a listing. Exchanges often take a dim view of shell companies (and even cash shells) and may make it difficult for their listings to be maintained indefinitely without acquiring some real business
A shell company can also mean a company that has never had a business (and certainly not a listing). In this context it often means what is also called a shelf company. These are incorporated purely to sell off-the-shelf. This offers a convenient alternative to setting up a company from scratch (the name of the company can be changed, new directors appointed, and possibly shares issued).
If a shell company in this sense has no active business, and has been in that state for some time, it is likely to be considered dormant and may be exempt from many reporting requirements.
Finally, the phrase is also used to describe companies that exist merely as a front for a person or organisation that wishes to hide its identity.