Duplicate content can have many causes and is one of the most common SEO problems. If, for example, a website is available in versions with and without "www" (domain.com and www.domain.com), then these are each considered as independent pages. In the worst case, both can end up in the index of Google, where they then compete with each other.
Session IDs and other parameters in the URLs can also lead to duplicate content being created. Another example is print-optimized pages. These contain the same content as the original, but with a different layout. For Google, however, what counts most is the content, which is then available twice.
To check whether there is duplicate content of your own page on Google, you can simply perform a "site:" query. With the search for "site:domain.com" all pages of the domain "domain.com" can be displayed in the index. Duplicate content will be apparent.
To avoid duplicate content you can set a canonical tag in the HTML code for any page or site that is a duplicate. The canonical tag will tell Google what you consider to be the "main" page or website that should appear in the search results. By using the canonical tag, search engines will know which duplicate pages or sites to ignore, and index the main page or site instead.
SEO plugins like Yoast also help to avoid duplicate content by building URLs in a way that avoids duplication.