The 3 months is not taken off the sentence, but it is taken off the time served.
Here's an example:
Let's suppose that the judge decides that the correct sentence for offence should be 18 months imprisonment. He'll pass that sentence irrespective of any time spent on remand. However (if we ignore tagging schemes here) someone sentenced to 18 months imprisonment will normally spend 9 months in prison. If the offender had been remanded on bail he'd serve 9 months from the date of sentence, but if he'd already spent 3 months remanded into custody he'd only have 6 months left to serve.
Chris



