What does apply_filters() do exactly? [duplicate]

The $instance['title'] corresponds to the title enter in the widget.

When a plugin or a widget as an apply_filters, the developper gently had a way to override the current value sets for the title.

Now, imagine you setted a title (in the widget setting panel) but you want to change this value only if user is logged in. You just have to add a filter in your functions.php

add_filter('widget_title', 'logged_title');

function logged_title($title){
    if(is_user_logged_in()){ // don't forget to test your widget id 
        $title="new widget title";
    }
    return $title;
}