I see the term i386 instead of x86 in many places related to Linux. As of my knowledge, they are not interchangeable. x86 is a family of instruction set architectures where i386 is a specific one of the x86 processors. But why do Linux world uses the term i386 instead of x86 ?
i386, or 80386, was the first 32-bit processor. When it was introduced, the word i386 is started to be using in many places, including in OSs and compilers, which made it impossible or very difficult to change later.
Even after the introduction of other advanced x86 processors, including the 486 and 586, many manufacturers didn't bother to change the label i386 and started to use it as an alias for 32-bit x86 processor.
The most logical name to refer to the 32-bit x86 architecture is x86_32, since it's the 32-bit extension of the x86 architecture, and it matches the style of the x86_64 name which is the 64-bit extension of the x86 architecture.
The name x86 is a retronym. Intel did not give a name to their instruction set initially. They later gave it the name IA-32, adding to the confusion. Before an official name was given, different groups came up with different names.
Linux distros decided to call x86_32 as i386 after the first x86 chip that was 32-bit, and then they called x86_64 as amd64 after the first x86_64 chips that came from AMD to avoid confusion with Intel's competing IA-64 (Itanium) architecture.
Apple decided to call x86_32 as i386 similarly to Linux distros, and then they called x86_64 as the logical name x86_64.