On this page of the guide to LEGO Skywalker Saga, you can find information on how to go through small holes and ventilation shafts located around that may lead, for example, to optional areas with secrets.
Using small holes and ventilation shafts in most cases serves to guarantee the possibility of reaching secret locations, but sometimes it can also be used to complete a story mission. The controlled characters cannot crouch or lie down on the ground and, as a result, you have to use alternative methods of squeezing through small holes.
The more obvious option is to use a small droid. The ideal "candidate" is BB-8 from the picture above, which you will easily unlock after starting the sequel trilogy (episode 7). As an added bonus, BB-8 is one of the playable characters in some missions. You just need to drive the droid into the hole, and you don't have to perform any additional actions.
Splitting a larger droid
A less obvious variant is to choose a droid that can split into two parts. The perfect example is C-3PO from the picture above. After you split the droid in half, you can start controlling, for example, only the upper part of the droid's body and get through the holes that are too small for the whole character. Once all the required steps have been taken, it is possible to seamlessly reconnect the two parts into a single unit.
Additional note - You may come across small holes also in story missions. If there are no playable droids in them, you won't be able to explore alternative passages right away. You have to repeat this stage (after completing it for the first time) but in Free Play mode. It allows you to select all unlocked characters and unlimited switching between them.