Then, come up with an idea. It could be a new case, a different take on an existing character relationship, or a what - if scenario. For instance, what if a character had made a different choice during a crucial moment in the series? After that, start writing. Don't worry too much about grammar at first, just get your ideas down.
You should also do some research on forensic science if you want to make your fanfiction more realistic. There are many online resources and books available. And when you're done writing, read it over, edit for grammar and clarity, and maybe ask for feedback from other CSI: OC fans.
First, you need to know the CSI: OC world well. Watch the series multiple times to understand the characters, their personalities, and how they interact. For example, know that the CSI team has specific procedures for handling evidence.