I have written on this topic before, but, because it is a source of a lot of misunderstanding among the general public, it needs more attention.
Police shows for decades have shown people being arrested and read the Miranda warning, ‘their rights’, you have the right to remain silent, etc. Many people assume understandably that the police have to read those rights when they arrest you, and, if they do not, you may be able to get the case thrown out. That is not true, the rights are only required if the police want to use a statement that you make when they question you while you are in custody, i.e. arrested, under the control of the police, or, at a jail. There is no law that the rights have to be read when the police arrest you, it is only if they want to question you after the arrest. The rights also do not cover voluntary statements, meaning if the police do not ask you questions, but you blurt out your own statements that hurt your case, they can be used even with no rights reading.
Bottom line, when you are arrested, you are wise to use your right to remain silent, except for stating your name, and a list of any medications that you will need with you at the jail. TV and the internet can be fun and interesting, but, as sources of information about how the real-world legal system works, they are not a good bet.
Ed