This script will give you a list of databases
SELECT name, database_id, create_date
FROM sys.databases ;
GO
This will backup a database:
BACKUP DATABASE AdventureWorks2012 TO DISK='d:\adw.bak'
I don't know if you can use a select to do multiple backups, but if all else fails, you could use a CURSOR and 'EXEC' to create and run SQL that backs up all your databases.
Actually, the easy way is to run this:
select 'BACKUP DATABASE ' + NAME + ' TO DISK=''d:\' + NAME + '.bak'''
from sys.databases;
which will create a table full of the backup commands you need. Then you can just run them, one by one, or in sequence, in Management Studio or in a proc.