You need to create separate user groups for users of each company, and then grant permissions to access project (Browse Project) only to respective group.
You can learn more about permissions in Jira here,
Would you mind elaborating a bit more? For example, are these companies your clients that you need to work and communicate within Jira? Do these companies collaborate with each other? Are there subcontractors involved that need to be added in separate projects or other instances?
Besides what @DPK J mentioned, you can also set up synchronization schemes to allow issues to be synced across projects whenever this makes sense.
For example, when those companies are collaborating, they can stay in their own environment or stay up-to-date of progress using synchronization.
We're part of the team that developed Exalate, it's a sync solution for Jira and other trackers.
Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events