Both really. Some times you don't need the overhead of a database, you just want to do a damn join in Excel or something.
But also, it has the option to connect to an external database. When connecting, you can pull Excel tables into the database as temp tables, do queries (or import the data from the temp tables into permanent tables), and write results back into Excel. What's more you can automate this, even without VBA.