Don't dwell on publishing.
Think ONLY of writing the book.
As without the book, there is nothing to publish, and publishing is something subject to the whims of other individuals.
If it is fiction (I am assuming) then don't worry in the slightest about it being "too similar" to something already out there. Millions of books have been published, and (taking things to the extreme) there are only 7 basic plots to be told across all genres. ( Comedy, Tragedy, Beating the Monster, Rags to Riches, Quest, Voyage and Return, Rebirth.)
How you deal with these plots is the making of your story - and stories themselves are told and retold in many different ways.
(Star Wars = The Hidden Fortress)
(The Magnificent Seven = Seven Samurai)
If you get yourself hung up on worrying about your story maybe having a doppleganger out there somewhere, then you will never write it... or at least not in a way that is true to the story you actually want to tell. The unfortunate fact is that there are NO hard and fast rules to what will or won't be published. Publishers want new ideas, but also material similar to that which they already publish. They can give SOLID guidelines for what writers should and shouldn't do, but then announce they want someone to break the rules.
There is no easy answer.
But, again, it all comes down to what you expect to happen to your book.
If you just want the story out there, then Publishing is not difficult at all. If you want to be rich and famous, then best you learn a musical instrument, or take acting lessons - because the odds of being famous in those respects, however high, are nothing compared to the folly of writing (books) to try to make a living. Most published authors do not write full time (unless they have understanding spouses). Only the big names can earn enough to do that.
As regards publishing in general, there are basically three ways into it:
Self-Publishing - The easiest route. There are a LOT of places out there who will make your book available. Amazon being the highest profile. But as said above they do NOTHING but make it available. No hype, no marketing, no advertising - it is ALL down to you. If making money is your goal, this is the least likely route to do so... BUT the book will be published, it will *exist* (ISBN and all!)
Agent - Finding an agent can be as difficult, if not more-so, than having a mainstream publisher take you on board.
But there are a lot more agencies than there are publishers. Times have changed in the literary world and agents are now much more open to receiving unsolicited MSS, even by email, as long as their submission guidelines are followed. And there are almost as many different ways to submit than there are agencies! Agents will take your work and then use their contacts to approach publishers/editors whom they think best suit your product... for anywhere between 10-20% of the income.
Publishing Houses - This could be split into two. Mainstream and Small/Fledgling/New presses. Again, nowadays, most publishers will accept unsolicited submissions, and again all have their own guidelines. Most new writers taken on will get an advance of around £/$ 2000. Anything beyond that comes down to your contract. BUT the difference is that the publishers will market the book. (And often, don't... leaving a book adrift... which I imagine would be even more frustrating than a self-published book not selling)
Publishers can come with their own pitfalls. Torturous contracts, restrictive marketing, months waiting to find out whether or not they have even looked at your MS, MANY MANY rejections. (This is a way of life for a writer. If you can't handle rejection, it is not for you) Or, as has just happened to me, the MS taken on, worked with, cover discussed and then at the 11th hour one of the publishers better known authors handing them a book with a similar theme to yours... and yours is handed back with a thank you and a "let us see your next MS!" (That one knocked the stuffing out of me for about 6 months.)
Publishing should not be your goal. Finishing the book to the best of your ability should.
There are a MYRIAD of resources out there for the fledgling author. Books, mentors, paid and unpaid, facebook groups, support groups, writers circles etc etc even (whodathunkit) web-comic forums!
Research all of these options above, and then revert to self-publishing if all else fails.
Yes, there are stories of the unknown author taking the world by storm =- but remember that these stories only catch the imagination because they are so very, very rare.
Don't write for a projected audience... write for yourself.
Just write your book!
(and the best of luck to you!)