The intern() method in Java's String class is used to return a canonical representation of the string from the string pool. It's primarily used for string comparison optimization - interned strings can be compared using == reference equality instead of equals() for content comparison.