When you first install Visual Studio 2010 RTM and try and click F5 on a sandboxed solution project (default project) you may see this error:

Basically you need to go into Central Administration, select System Settings, select Manage services on server. Find the ‘Microsoft SharePoint Foundation Sandbox Code Service’ and click Start.

Your solution will now work. Would have been nice to get a explanation in VS2010 to summarize this rather than rely on Bing/Google