Spare key fob for my BMW 6 series is not working

The spare key fob for my BMW 6 series is not working. Do they have a battery in them I can change? If so how do I do this?