What are my rights against police officers in California?

as a 17 yr old skateboarder i get held by the police a lot and id like to know more about my rights as a citizen, like when am i allowed to walk away or refuse to show ID. if there is anything else i should know as a citizen please feel free to add more information.
7 answers 7