Hello Akriti, you can clear the text in a text box by using clear() method in Selenium Webdriver:
WebDriver driver = new FirefoxDriver();
driver.get("https://www.gmail.com");
driver.findElement(By.xpath("xpath_element1")).sendKeys("Value1");
driver.findElement(By.xpath("xpath_element1")).clear();