As seen about 53 seconds into this video of the Qantas Dreamliner landing, the engine housings seem to extend upon landing. What specifically is the purpose of this? To balance? To help with air flow?
Those are the thrust reversers, which cause the engines to produce thrust "backwards" to help slow the aircraft during the landing.
You can see a close-up video of 787 thrust reversers in operation, including a look at the panels at the back of the engine which block the normal flow of air.
We also have a question How do thrust reversers work on a jet engine, and when should they be used?, which describes their operation in general.