Blood tests can detect some forms of cancer.
When a doctor draws blood and sends the blood out for testing the blood can be tested to measure your blood cell counts on the different types of blood cells you have.
Different types and quantities of blood cells can detect problems with your health and possibly detect cancer.
If the blood test determines you might have cancer then the doctor will have some other tests performed such as a needle biopsy.
If you do have cancer and get treated though you can usually expect to live a good long life if the cancer is caught and treated in a timely manner.
So while a blood test can detect somewhat that you might have cancer some other tests such as the needle biopsy will be required to get the proper diagnoses.