Difficult

You throw me out when you want to use me and you take me in when you don't want to use me. Who am I?