The first is to create your solution in a desktop file in order to edit the query, etc. Then publish to the Service. From the Service you can go to the report and "Publish to Web" under "File" (this is in preview though, and be aware that you are making your data public)
The second option is the new "Power BI Embedded" feature that was just announced at the /BUILD conference. I'm not 100% familiar with this, but it appears to start by using the desktop and utilizing that desktop file in your application.
This post is the best explanation I've seen.
Hope that answers your Q.