This effect lasts for five turns.
'Trick Room' will have an effect on the Pokémon that uses it, and any Pokémon that switches in within the five turns that it is active. If you use 'Trick Room' whilst one is already in effect, it will end it immediately.
Hope I helped. :)