It's most commonly referred to as a DISA valve. It adjusts the length of intake to help open the car up above 3000 rpm.
They aren't necessarily a wise part to buy secondhand and in any case the 4-cylinder one doesn't come up very often compared to the 6-cylinder one. A new one is expensive - £250 from BMW. There is a copy part by Vaico but contrary to popular belief they are not the OE manufacturer, Bosch are. I wouldn't use a copy part for an application like this.
Unless it's faulty I'd be inclined not to change it. They are well known for making noises. That said they are very easy to change, just remember to replace the o-ring.