First and foremost, you will have to load the SP.Taxonomy.js on your page explicitly as it is not loaded by default in SharePoint. Also make sure that you have loaded the SP.Runtime.js and SP.js files before continuing with your taxonomy code. Various errors like "SP.Taxonomy is not defined" or "Unable to get property 'TaxonomySession' of undefined or null reference" might come up if you have not loaded all the 3 necessary files on your page.
A simple way to load all the 3 files is with the jQuery.getScript function:
Now lets see some actual code which you can use to Manipulate the Taxonomy Items:
1) Query a particular Term Set and get all the Terms under it:
2) Create new Term Group under the Term Store:
3) Create new Term Set under a Term Group:
4) Create new Term under a Term Set:
5) Get Value of a Single Value Taxonomy Column in a List:
6) Get Values of a Multi Value Taxonomy Column in a List:
Hopefully you found this helpful. Happy SharePointing!