I'm asking this question from the viewpoint of an almost complete newbie in court law.
I've heard stated by plenty of lawyers that you should never talk to the police, and the only thing you should say is: "I want to talk to my lawyer". There are plenty of reasons given for this advice, one of them coming from the police itself when stating your Miranda warning: "[..] Anything you say can be used against you in court. [...]". It doesn't state that it can be used for or against you in court, but only against you. That seems... odd.
As a layman, I'd imagine that any type of evidence that is valid enough to be used against you, should be valid enough to be used in your favour. After some research, it seems that when the evidence is used against you, it is acceptable, but when used for you, it's considered hearsay. The definition of hearsay that I usually hear -- which is the one also present in the Wikipedia article -- is:
[...] testimony from a witness under oath who is reciting an out-of-court statement, content of which is being offered to prove the truth of the matter asserted.
Now, this definition seems to fit this type of evidence very well, so it makes sense that using it in your defense case would be invalid. On the other hand, that doesn't seem to stop it from being accepted in the prosecution's case.
So my question is: Why are statements made to the police considered acceptable as evidence when used in your prosecution, but hearsay when used in your defense?