With increasing international trade, Royal charters were granted in Europe (notably in England and Holland) to merchant adventurers.
All different forms of companies depend on the particular law of the particular country in which they reside.
Other types of business associations can include partnerships (in the UK governed by the Partnership Act 1890), or trusts (like a pension fund), or companies limited by guarantee (like some community organizations or charities).
Corporations can even be convicted of criminal offences, such as fraud and manslaughter.
Although some forms of companies are thought to have existed during Ancient Rome and Ancient Greece, the closest recognizable ancestors of the modern company did not appear until the 16th century.
This rule is called limited liability, and it is why corporations end with "Ltd." (or some variant like "Inc." and "plc").