As a smartapp, it will run in the SmartThings cloud.
You might find the two following FAQs helpful ( The topic title is a clickable link):
The following may also be of interest: