MacBook has black screen, boots up but just the fan runs
Credit: Apple 


  If your Mac won‘t turn on
  Learn what to do if your Mac won't turn on.
  
  Rule out display issues
  
  First, rule out the display as the source of the issue. To be sure you're not having a display issue, press your computer's power button. If your Mac has power but doesn't have any video:
  You may hear a startup chime.
  You may hear fan or drive noise.
  You may see a light from the Sleep LED, if your Mac has one.
  Pressing the Caps Lock key on the keyboard causes it to light. 
  If any of these things happen and you have an external display, get help with video issues on external displays connected to your Mac. Otherwise, continue with this article.
  Power issues
  
  If your Mac won't turn on and you have ruled out display issues, try these steps.
  Verify that you have a good connection from your Mac to the wall outlet by confirming the power cord and adapter are securely connected and plugged in. To check if the wall outlet is working, plug in a lamp or other electrical device.
  If the wall outlet is working and you continue to have no power, try another power cord or adapter, if available. If you're using a Mac notebook, learn about troubleshooting MagSafe adapters, and leave the power adapter connected long enough to provide an adequate charge to the battery.
  Disconnect all accessories that are plugged in to your Mac. This includes things like printers, USB hubs, or mobile devices.
  Hold down the power button for ten seconds. Then press the power button again to see if the Mac turns on.
  Reset the SMC.
  If you recently installed memory or a drive in your Mac, make sure it's compatible and installed correctly. If possible, reinstall the original memory or drive to see if the issue persists.
  MacBook Pro: How to remove or install memory
  MacBook: How to remove or install memory
  Mac Pro: How to remove or install memory
  Mac mini: How to remove or install memory
  iMac: How to remove or install memory
  If your Mac still won't start up after you've tried each of these steps, visit an Apple Store or Apple Authorized Service Provider for further diagnosis. If you plan to visit an Apple Retail Store, make a reservation at the Genius Bar, if available in your country or region. Diagnostic fees may apply for issues not covered under warranty or AppleCare Protection Plan (APP).