Information on plugin adding text when a post, page, or other such is displayed

Add this filter to functions.php file. Make your changes as needed.

function display_my_content( $content ) {
    if ( is_single() ) {
        $the_content="Before your content";
        $the_content .= $content;
        $the_content .= 'After your content';
        return $the_content;
    } else {
        return $content;
    }
}
add_filter( 'the_content', 'display_my_content' );

WordPress theme API or plugin API can be used anywhere, so when you develop a plugin you can use the plugin API. All APIs can be found at this link.