This is meant to be a canonical question, to which particular cases can be referred. We've had several particular instances of this question in the past - "is my story too similar to specific story X". The older ones got answered, the newer ones got closed as off-topic. These questions however never get closed as duplicates of each other, being different in their particulars. The purpose of this question is thus that all similar questions in the future may find an answer here.
My story shares some similarities with an existing work: a major plot element is the same, or an overarching concept is the same.
For example, I have a regular child suddenly realising he can do magic, and start learning it (Harry Potter, Kaytek the Wizard). Or, there are people flying on dragons, and those constitute an aerial force used in battle (Dragonriders of Pern, Temeraire).
How do I know if my work is OK / original enough, or if it is too similar to another work, derivative and constitutes a copyright infringement?