It varies somewhat based on context and operating system, and the behavior can be redefined through settings or expanded by applications or utility software. As general rules for default operation:
Things that are, or act like, hyperlinks, or controls, like buttons, operate with a single click.
For objects, like files, one click selects the object. Double click executes the object, if it is executable, or opens it with the default application.
However, the mouse controls can be optionally set to select just by hovering and open/run with a single click. That's a matter of personal preference.
Some applications software define additional, specialized uses for double click. For example, double-clicking on text in some word processors selects a predefined amount of text, like a word. Excel and some other spreadsheets define special operations that can be done with a double-click depending on where it is done. For example, double-clicking on a row or column boundary will resize automatically to accommodate the row or column contents.
Those kinds of specialized uses for double-click are more in the nature of features of the software that you learn. In many cases, they have been adopted by competing applications so you will find that they often work when you switch software.