Apparently it was a suicide by asphyxiation, and police in Marin County, CA were alerted around 12 PM and found him in his home. The news had caused his wikipedia page to briefly crash with so many people flooding to it.
Williams had battled alcohol and drugs in the past, and recently went back into rehab this past July. He talked openly in the past about dealing with depression and recently it had returned, possibly triggering his suicide. Its sad news, and we often forget that just because someone is a famous comedian playing happy, funny characters in big movies and TV shows, that doesn't mean they can't have problems in real life just like anyone else.
Since rising to fame in 1978 on the show "Mork and Mindy", he made millions laugh with roles in many incredibly popular movies, especially during the 90s with a string of hit family movies. However, he also took on many more dramatic roles as well. Here's just a sampling:
1987: Good Morning, Vietnam.
1989: Dead Poets Society
1993: Mrs. Doubtfire
1997: Good Will Hunting
2002: One Hour Photo
2006: Happy Feet
2009: Night at the Museum: Battle of the Smithsonian
2013: The Butler