Civil rights come from the U.S. Constitution. These are natural rights you have as a person in a free country.
Nobody has the authority to take away these rights. Most of your civil rights have specific protections under the law. When it comes to a legal situation, you may lose certain rights, but some are inalienable and something you retain no matter what.
Right against discrimination
One of the rights you have is to not face discrimination for certain protected aspects. For example, an officer cannot arrest you or harass you due to your race, religion or gender. You cannot face charges simply because you are part of a certain group. For example, law enforcement cannot arrest you due to a disability or because of your ethnicity.
Note that while you have these protections, if you did break the law, then the officer has a legitimate reason for arresting you.
Right to silence
One of the most important rights when interacting with law enforcement is your right to remain silent. You do not have to provide information to an officer beyond your name.
Right to legal representation
If law enforcement wants to speak with you, you have the right to an attorney. You should not speak with officers without having an attorney present.
Right to refuse
You also have the right to refuse searches. Unless an officer has a warrant, you do not have to let them into your home.
Law enforcement’s job is to get to the bottom of a criminal situation. While they must honor your rights, it does not mean they will not try to trick you out of voluntarily giving them up. So, make sure you know what they are and uphold them yourself.