I am a big fan of certain authors' writing styles and stories and I am convinced that when I sit down to start writing my first book, I'm bound to copy an idea or theme from an author. How do I create my own original work inspired by other authors without risking plagiarism.
Consider that the theme in author A's book that is inspiring you was almost certainly found by author A in author B's work and inspired them, and so on. What's important is that you find a unique and original way to weave a story around that theme. For instance:
What did I just describe? Star Wars, or Lord of the Rings? The same elements and themes can be brought together in a thousand different ways and still be original works.
Which is all a rather long-winded way of saying, "Find the core elements of the idea that inspire you, divorced from the trappings of the original work's worldbuilding, and build your original work from those building blocks."
UPDATE: I don't yet have the rep to add comments, but I want to respond to the answer below from what. I am in no way suggesting that you intentionally scour external sources for inspiration as what appears to be implying. The primary question was not "where can I find inspiration for my writing". As writers, we know that one of the most important things we can do is read. It is inevitable that during the course of that reading, we will hit upon things that will spark ideas in our minds. The OP was asking what was the best way to expound upon those ideas without plagiarism. And for that, my answer of "distill the inspiration down to its barest form and then refashion it using your own ideas/experience/worldbuilding" is still appropriate.
Take elements from multiple sources and combine them in a unique way. The reality is that none of us is entirely original; we all borrow (consciously or unconsciously) from others.
French writer Georges Polti claimed in the 19th century that there were only 36 dramatic situations that could occur in a story or performance. More recently Christopher Booker distilled seven basic plots of heroic stories. We could debate whether these counts are accurate or complete, but the point is that themes and ideas are reusable.
You can't help letting your favorite authors influence your work, but if you combine your ideas in your own way, the story will be all yours.
The answers by Roger and Bruce Alderman recommend to actively look for inspiration in the work of your favourite authors: "find the core elements", "take elements and combine".
I would recommend you do nothing of the sort, if you want to find your own voice.
Inspiration is not fandom. If you read the Lord of the Rings and feel you want to write a book like the Lord of the Rings, then you are not inspired, but suffer from post partum depression: you are sad that the book ends and you can no longer live in that fictional universe. If, on the other hand, you read the Lord of the Rings and you feel that you need to tell a different story, then that is inspiration.
Inspiration happens, when you feel that the story you read took a wrong turn and you want to tell a story taking the right turn. Inspiration happens when you feel that the characters would not act in that way, and you tell how they would truly behave. Inspiration happens, when you encounter an idea that was not developed, and you develop it.
In short, inspiration happens, when you feel the need to go beyond the original work, and tell us more, something new, something different.
And if you do, you do not need to worry that we will notice the relation, because a subsequent work commenting on its predecessors is not only legitimate but what we expect.
But instead of merely elaborating on an existing work, you could also write from the core of your own being.
Life leaves a residue in your self. This experience, as we call it, stems from your real life adventures, from media (e.g. books), and from your reflections on it all. If you draw your inspiration from there; if, for example, your job, your relationships, and the Lord of the Rings came together and sparked an idea (just like the Second World War, his family and norse mythology sparked the Lord of the Rings for Tolkien); then you have inspiration of a higher order – and the potential to write a groundbreaking work that will inspire other writers.
And no one, again, will care, if they can identify what about the Lord of the Rings lit the spark.
The difference between copyright violation, plagiarism, and inspiration is a range and not three distinct points.
Obviously -- I think this is obvious anyway -- if you copy somebody else's story word for word and put your own title and by-line on it, that's copyright violation.
If you take somebody else's story and make just enough changes to avoid copyright law -- like you go through and rewrite all the text in your own words while not changing the plot or characters in any way -- that's unimaginative, if not plagiarism.
But we all get ideas from others.
I often hear people criticize a story as "just a copy" of some other story based on the thinnest of similarities. Like any movie that presents the same incident from two different points of view seems to inevitably be called a rip-off of Roshomon. I've heard stories called copies of Romeo and Juliet despite having no discernible similarity other than also being a love story. Etc.
So yeah, I've seen movies where it appears that someone took the script for some other movie that made a ton of money and just went through doing search-and-replace with a word processor to change the names of all the characters and places, then shuffled a few scenes around, added a couple of car chases and explosions, and made their own movie.
But I've also read plenty of books that borrow ideas from each other but then explore them in different ways. Just because two books are both about, say, time travel doesn't mean that they are the same story. There are lots of things you can do with that idea. Etc.