When content editors are adding content within Umbraco, they might not always want to instantly publish every page to the website straightaway. You can do this by setting the page to publish date to a future date. An unpublished page post is a page post that won’t be visible on your page and from my experience, it's really easy to forget where you've created unpublished pages.
When you're creating backend Umbraco packages, sections, and custom backend pages, you may need to display a list of unpublished pages to help make the content editors' lives a little easier. On the majority of sites I've worked on that's needed this type of functionality, it's been the news or blog post section where I've implemented an unpublished page list. If you only need to find all the unpublished pages of a certain document type, you can use the GetContentOfContentType() and then filter those pages by it's published state, like so:
Now we have a list of IContent pages, we can use the IContent Published property to filter out any unpublished pages, like so:
When you work with the content service you can either work with the Content Service API, which is slower and talks to the database directly, or the Content Service that commutes with the Examine cache. As performance won't be as big of an issue in a backend page/extensions as it would be on the frontend side of the website, the content service is an acceptable API to use. When you work with the content type service API, you will get published and unpublished pages back, which you can filter out using the 'Published' property.