Block content output using plugin


I need to stop page/topic content output by using plugin. Is it possible? I wrote a plugin to store a cookie after x number of visits. Once that cookie is found, we need to block content output of whatever page/topic that user visits. We just need to figure out how content output can be blocked. Please advice if it’s possible and how. Thanks.