The primary purpose of Parts A and B of this study is to evaluate the safety and toxicity of prexasertib (an inhibitor of checkpoint kinase 1[chk 1]) in participants with advanced or metastatic cancer (Part A), or squamous cell cancer of the head and neck or squamous cell cancer of any tumor type (Part B). Part C of the study will evaluate prexasertib in three different groups of participants; those with squamous cell cancer of the head and neck that has recurred or spread to other parts of the body, those with squamous non-small cell lung cancer that has recurred or spread, and those with squamous cell cancer of the anus that is not curable by existing therapy.