There's two ways you can go about this:
First, you could use the preg_replace() function to replace the BBCode:
<?php
$string = '[quote]This is a quote[/quote]';
$pattern = '/\[[\/a-z]+\]/i';
$replacement = '';
echo preg_replace($pattern, $replacement, $string);
?>
You might need to tweak it for the BBCode tags with have attributes, like images, etc.
The second method is to replace all the [ and ] characters with < and > then just use the strip_tags() function to remove the resulting HTML tags:
<?php
$string = '[quote]This is a quote[/quote]';
$find = Array('[',']');
$replace = Array('<','>');
$new_string = str_replace($find, $replace, $string);
$new_string = strip_tags($new_string);
?>