What type of database? MS Access, SQL Server, other?
Some ways are below:
==== MS Access ====
Create a standard blank MS Access MDB file, named "DEFAULT.MDB"
When ready to create a new database, copy the "DEFAULT.MDB" file to the filename that the user provided, then use this database accordingly.
==== SQL Server ====
Whatever application/script you're using needs to have permissions to create databases on the server. Then simply call the CREATE DATABASE commands with your user-provided name, and any options you want, and use this database accordingly.
Hope it helps.