Most computers purchased from manufacturers like IBM, Dell, Acer, HP, etc. comes with a serial number (or service tag) and a model name at the back of it. But if you ever loose this information, then you can use MS-DOS commands to retrieve the information.
To retrieve serial number of the computer run the following command
wmic bios get serialnumber
To retrieve model name of the computer run the following command
wmic csproduct get name