An artificial language is a language created by a person or a group of people for a certain purpose, usually when this purpose is hard to achieve by using a natural language. Such a language can be based on an existing vocabulary or can create a new vocabulary.
If an artificial language does not serve the purpose of general-purpose communication (as natural languages do), then it is necessarily a second language.
Examples of artificial languages include:
It should be noted that the above categorization is not exclusive; for example, it is reasonable that a computer language can be constructed for a fictional work or that a linguistic experiment can be used to instruct a computer.