Honestly, the best thing to do is to read through the SugarCube documentation, even if you just skim through it. That should be enough so you have a general idea of what all it can do, and you can go back to it later if you need to know exactly how to do something. (If you have an older version of SugarCube you should download the latest version here and install it.)
Also, SugarCube is heavily based in JavaScript, so besides the functions you find listed in the SugarCube documentation, you can also use pretty much any JavaScript function as well. These sites are helpful for finding that JavaScript info:
W3Schools JavaScript tutorial
MDN JavaScript reference
Both of those have useful information on HTML and CSS as well.
Also, if you're doing any work with updating elements on the page after the passage is displayed (due to user interactions and the like), jQuery helps make that a lot easier. See the jQuery documentation for details (jQuery is included with SugarCube).
You can also import any SugarCube-based Twine games into Twine to take a look at their source to see how they work. I learned a lot from looking at other people's code this way.
And finally, I have a lot of random bits of useful SugarCube sample code here. It ranges from basic stuff to some advanced stuff. I update it whenever I come across some new useful code, so you can check the "Updates" page there to see what's new as well.
Hope that helps! :-)