Duplicate content is content that is similar or the same as the content appearing on other websites. Duplicate content may appear on the different pages of the same website too.
Duplicate content is not beloved by search engines. They do not know what to rank higher since it is the same. Therefore, they rank both pages lower or delete them from search results overall since it does not know where the original is.
In extreme cases, Google might penalize the website and remove it from search engines entirely. It happens rarely and only to websites that steal content from other websites consistently.
Therefore, it makes sense to avoid plagiarism and to create unique content (rewrites also get de-indexed).
However, it may also happen that there are duplicate pages within the same website and it is a coincidence. For example, eCommerce websites have an item in many sizes and colors. If you create a new page for every color, you might end up having dozens of pages that only differ in the color name. So it is better to create differences in size and color within the same URL.
You should also check your redirects and use canonical tags to avoid duplicates within the website.