Designing search box, displays content however

when a keyword is put in it automatically searches and displays the relevent data. My problem is when after the user deletes the word from the search box the data ie results doesnt disappear. Furthermore, any tips on filtering and retrieving data with more precision? alongside this when entering a query into the search box the whole page decides to move to the right, and then when deleting the query the whole page readjusts to the left again.