how exactly does Twitter API work?

I'm afraid it's not too clear here,
https://dev.twitter.com/docs/using-search

is there a download? is the API a javascript file, is it back-end stuff? it uses REST API? what does this mean exactly?

I don't get this documentation.. the only code examples are what shows when you get an error... hilarious....

I need to write a little Twitter search thingie... I can't make heads or tails of this.. I can't even find a "download" link anywhere......

I'm looking at this, https://twitter.com/search-home, but I still don't see how they connect to the API....

thank you....