It only happens when you connect the phone to the Pc/laptop. Don't connect the phone until after the PC has booted to the desktop.
What are you trying to do with your phone and the computer?
Also, if you use Iphone, you need iTunes installed so that the PC can recognise the iphone as a phone and not as a camera device.
Other branded phones will also need special driver installations for the OS to recognize the phone as a phone and not just a plugged in memory storage device.