The code in the attached screenshot shows how to detect touches on the touch screen.
Help can be accessed by positioning your cursor on a SmileBasic command then tapping the [?] button near the upper right corner of the touch screen.
The touchscreen is an important part of programming! Use TOUCH OUT TM, TX, TY. If TM equals 0, then it's not being touched. You can figure out the rest pretty easily.
Clear it of what? If you want the keyboard to disappear, the XSCREEN 2 will do that, but it'll reappear when your program is finished running. If you've printed text to the lower console screen, try DISPLAY 1 and CLS. If you've drawn graphics on the lower screen, try DISPLAY 1 and GCLS.