A database is two things working together: the data itself, and the software that manages it. The software is the database management system (DBMS), for example PostgreSQL, MySQL, MongoDB, or Redis. When people say "the database", they usually mean the running DBMS plus the data it owns.
The job of the DBMS is to take messy raw bytes and turn them into something you can query safely while many users hit it at once. It enforces structure, handles concurrent reads and writes without corrupting data, survives crashes, and answers questions like "give me every order placed by user 4821 in the last 30 days" in milliseconds instead of you scanning a giant file by hand.
Databases split into broad families. Relational databases (PostgreSQL, MySQL) store data in tables with rows and columns and connect them with joins. NoSQL databases drop the rigid table model: document stores (MongoDB) keep JSON-like records, key-value stores (Redis, DynamoDB) map a key straight to a value, and graph databases (Neo4j) store relationships as first-class data.