You can use SQL databases or NoSQL databases or just keep it on the server's File system.
If you use SQL databases (such as postgresql, mariadb, mysql, MSSQL, Oracle, etc), you may keep it as BLOB (Binary Large Object) inside the DB or you keep the path that point to image on filesystem. and you need to understand table relations and also SQL language.
If you use NoSQL (such as MongoDB, couchdb, cassandra, redis, etc), again you may keep it as BLOB or path to image. you need to understand JSON and the provided API from database engine that you use (i think there is no api standard for nosql yet)
If you use filesystem, you need to organize directory structure and filename (actually if you keep path in DB, you also need to organize it as well)
IMHO, I will use filesystem for small project but for large project, I will use BLOB in SQL database because we can utilize database features for backup/restore, scaling, monitoring, kind of that, jobs