I am new to sharepoint online. At first I need to know the difference between sharepoint online and office 365 preview.
Preview site: https://portal.microsoftonline.com/Admin/Default.aspx which looms like below.

I have also the below site

Now what is the difference between the two. My goal is to create apps and webparts. Which one shall i choose? I have not installed sharepoint 2013 server/ sharepoint foundation. Can i create apps and webparts without installing server2013/foundation2013?
The Office365 Preview is running on the new SharePoint 2013 platform. If you want to build and monetize apps/web parts, you would need to go with this option, as it is the
latest and greatest.
Go to http://dev.office.com to get all of the resources you need including links to the software, tutorials, documentation, etc…
Microsoft provides a free Office365 portal specifically for developers who want to build apps on the online platform. With this, all you would need is Visual Studio 2012 and the SharePoint/Office SDK installed to build apps. You would deploy and debug directly on the online portal without needing SharePoint installed on your environment.
I hope this helps.