First go to the spreadsheet that you want to import the data from (docA) and observe the value of the key mentioned in the URL (Eg: https://docs.google.com/spreadsheet/ccc?key=ABC#gid=0, in this case the key is "ABC").
Now go to the cell in docB and use the importRange function to import the data.
=importRange(, !:)
Eg: =importRange("ABC", "Sheet1!A1:B10")
If you want to import just one cell:
E.g. =importRange("ABC", "Sheet1!A1");
If you don't mention the name of the sheet, the first sheet is used.