Most beginner projects will not require the use of a database as all pertinent information can be stored locally. However if you are looking to gather large amount of information and process it, a database will be integral. A database is simply defined as a structured set of data that is stored on a computer and accessible in several different ways, such as reading and writing data, or performing more complex operations on it.
There are many types of databases, but the most common are SQL databases. Alternatives which don't use SQL are called "NoSQL" databases.
SQL is a programming language designed specifically for managing databases, and is thus well suited for this purpose. Many SQL databases exists, such as PostgreSQL and MariaDB.
For most situations, SQL databases are well suited. However, in other cases, NoSQL databases may be used. A popular NoSQL database is MongoDB, but there are many others.