Theme is the meaning that the events of a story add up to.
For instance, the theme of Rocky is the triumph of the human spirit.
The theme of Anna Karenina is adultery and marriage in 19th Century Russia.
The theme of Quiz Show is honesty.
The (somewhat generic) theme of Lord of the Rings is good-versus-evil. (Star Wars, like Lord of the Rings, is also a morality tale.)
The theme of Miller’s Crossing is ethics and order in an orderless society.
The theme of Bladerunner is human life and the constant struggle against death, which is what gives life meaning.
It is important to note that not all stories necessarily have a theme: if the events of a story aren’t well-plotted — which is to say, if the events are random, or haphazard, or overly coincidental — those events will add up to nothing, and the story will be themeless.
A well-done story blends theme and plot, so that the events dramatize that theme, and the characters embody the theme’s characteristics.
Plots are a vehicle by means of which some facet of human existence or the human experience is made concrete.
That facet (for example, honesty in the case of Quiz Show) is the theme.
Two similar plots in the hands of two writers who don’t share the same philosophical viewpoint will inevitably end up being about two different things, even if the events of the story are the same, or essentially the same. Why? Because their themes will be different.
A nihilist or a fatalist, like Darren Aronofsky, could not make Rocky a movie about triumph, even if the basic plot-line is the same: his view of life precludes such a theme.
This is one of the two main reasons it doesn’t matter if the storyline you think of has already been done. It’s also why it doesn’t matter to us very much that Shakespeare’s plots were largely borrowed. The other reason is discussed here.