Look at the source of the work. If it is an academic journal or a scholarly book produced by an academic publisher, it is usually the author's primary research. If it is a literature review written for a course, non-scholarly book or article, it is probably secondary research. Of course, all of this is secondary research if you were to use it in a document because you did not collect the information.
Read the methods section of the work. In an academic article, the author will describe how he collected the data. If he collected it using interviews, observations, lab tests or surveys, the article is primary research, at least in part. In a book, the same methods apply, but the author will discuss her methods in a preface or introduction. If methods are not discussed in the book or article, it is probably secondary research.
Run a plagiarism check on the article or a passage from the book to make sure that it represents original research and was not copied from someone else.