Invisible creatures are not automatically hidden
Invisibility only provides that:
For the purpose of hiding, the creature is heavily obscured. The
creature's location can be detected by any noise it makes or any
tracks it leaves. (PHB 291)
Thus they still have to hide to make their location unknown to others, but they can do it anywhere. This is a Dexterity(Stealth) check versus the Passive Perception score of anyone able to detect them.
If they have to look, it is an Action
It is called the Search action and is described on page 193 of the PHB:
When you take the Search action, you devote your attention to finding something.
It will pit a Wisdom(Perception) roll from the searcher against the previously rolled Dexterity(Stealth) check from the hiding creature.
The DM can rule otherwise
This is a general rule. If the DM believes that something should happen a certain way, they are allowed to rule against the book. This, unfortunately, must be done on a case-by-case basis. Pay attention to be consistent, though.
It is reasonable that walking into (the space of) an invisible creature might reveal them. If they wish to let the other creature pass, calling for a Dexterity(Stealth) or possibly Dexterity(Acrobatics) check seems adequate.