Okay, I spend most of my free time writing fanfiction, so here's what I've learned over the years:
Firstly, if you haven't already, read other fanfictions (or even books if you're happy to delve outside of your chosen fandom), especially if you're finding you lack ideas. They may provide inspiration.
So you get an idea. Time to expand on it!
What story are you wanting to tell? Who's is/are the main character(s)? Who's the antagonist (if any)? Who is in the supporting cast?
The genre? Is it an adventure, a romance, a horror, a mystery?
Are you planning to follow canon or would you like the characters to explore an alternate universe?
The good thing about fanfiction is that you've already got the setting and the characters, so you can save a lot of time developing characters as your readers are most likely already familiar with them. But you may have to design and develop OCs if you want them in your story.
Once you have the basic idea and characters sorted, write a skeleton plan - the bare bones of the story. What happens in the beginning? What happens at the end? What are the major events throughout the story? You can then add more details as you go!
If you are writing a long fic, write a chapter plan like Ducky said. Think about the aim of each chapter - what is the main event, which characters are involved, and how does it move the story forward?
And finally... Write! Don't worry too much initially about how it sounds or flows - get the main ideas in there and then you can go back and edit the details and proofread later on.
The most important thing is to have fun with your story. The beauty of fanfiction is that it's a hobby. You don't have to worry about writing some literary masterpiece. Write what
you want.
Then you decide if you want to publish or not. There are lots of platforms out there to publish fanfictions such as AO3, fanfiction.net or Wattpad. Some fandoms are more active on different sites. Most fandoms I know are more active on AO3. LBT is an exception, being more active on Fanfiction.net.
So.... yeah. Plan, and have fun! There are some great communities out there dedicated to writing fanfiction where you can brainstorm with people, find beta readers (people who will proof read and give constructive criticism) and just chat it all out.
Good luck!
