The Content Editor Webpart will allow you to add HTML and JavaScript in the page. One powerful feature of the CEWP is that you do not have to put your code inside it, you can link to any script file located within a Document Library.
Code can do anything the logged in user is allowed to do.just search for JSOM, be aware that SharePoint 2010 had less advanced possibilities compared to SharePoint 2013, so example code might not work for you always.
In SharePoint 2010 days we didn't use JSOM that much but still used the SOAP (XML) API to talk to SharePoint, Marc Anderson created the awesome SPServices (jQuery) library, a must for anyone doing SP2010 Front-End development: https://spservices.codeplex.com/Every SharePoint environment has those APIs, REST being the modern future proof one (but again.. SP2010 REST APIs are limited)
So you do not need to load anything, just be aware SharePoint loads them for you, and with JSOM you have to wait executing your code till SP.js was loaded by SharePoint. You will seeexecuteOrDelayUntilScriptLoadedin many examples
###Tip
Tip
Start your developer experience in the F12 Dev Tools console of the Chrome browser. Under Sources/Snippets you can develop all your code you eventually want IN SharePoint. As long as you are logged into SharePoint you can code against SharePoint a lot faster then using WebParts and hitting F5 all the time.
https://developers.google.com/web/tools/chrome-devtools/javascript/snippets