M simply means manual. If you have an automatic car and you have the M button, pressing this button will shift your transmission into manual mode where you can change your gears manually. While on M-sport cars made by BMW. This button will transfer your car into high-performance mode.