There are a few different commands that can be used to sent print jobs to the printer.
The lp command can be used to print a file. In this example, the foo.txt file will be printed to the default printer the /etc/cups/cupsd.conf file.
If you have more than one printer or more than one print queue, the lp -d command can be used to specify a printer or queue.
lp -d HP-Laserjet-4000 foo.txt
man lp info lp