Depending on the type of your version control system, conflicts arise in different situations.
Non-distributed version control systems
Working in a team, you might come across a situation, when somebody commits changes to a file you are currently working on. Conflicts can also arise on merging branches, applying patches or unshelving changes. If the changes are not overlapping, the files are merged automatically, but when there are changes to the same lines, you will need to resolve such conflict yourself.
When you try to edit a file that has a newer version on the server, IntelliJ IDEA informs you about that, showing a message pop-up window in the editor:

If you try to commit a file that has a newer repository version, an error is reported in the Messages tool window:

The commit behavior is regulated by the Create changelist on failed commit drop-down list in the Confirmation page of the Settings / Preferences dialog.
If you synchronize a file, that already has local changes, with a newer repository version, committed by somebody else, a conflict occurs. The conflicting file gets status Merged with conflicts. The file remains in the same changelist in the Local Changes tab of the Version Control tool window, but its name is highlighted red. If the file is currently opened in the editor, the file name on the tab header is also highlighted red.

Distributed version control systems
Under Git, conflicts arise during
merge
,
rebase
,
cherry-pick
,
unstash
,
or apply patch
.
Conflict resolution tool
IntelliJ IDEA suggests a tool for resolving conflicts locally. This tool consists of three panes. The left pane shows the read-only local copy; the right pane shows the read-only version checked in to the repository. The central pane shows a fully-functional editor with the results of merging and conflict resolving. Initially, the contents of this pane is the same as the base revision of the file, that is, the revision from which both conflicting versions derived.

- Select the conflicting file in the Version Control, Update Version Control, or Project tool window, or open it in the editor.
- On the context menu, under the node of your VCS integration, choose the VCS-specific merge command.
- Perform edit in the merge tool to apply or discard changes, as described in the procedures below.
- On the toolbar of the merge tool, click
(Apply All Non-Conflicting Changes),
(Apply Non-Conflicting Changes from the Right Side) or
(Apply Non-Conflicting Changes from the Left Side).
It is useful to automatically accept any changes that are not in conflict, and spend your time working on conflicting changes.
- In the left or right pane, select the change to be merged. Use arrow and/or find buttons on the toolbar to navigate to the desired location.
- Resolve conflicts. For the most simple conflicts, use Resolve action that
allows you to resolve conflicts in a single click, using the chevron
(
/
) or X buttons.
Since one can't be sure that a conflict is resolved properly, it's advisable to make it sure. That's why the conflicts are never resolved by
. - Click Apply.