user3454: My code means that when i press a button it displays a word, but by default words are already there and i need to get rid of those default words.
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);

int buttonApin = 4;

void setup() {
 pinMode(buttonApin, INPUT_PULLUP);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Mission Control ");
}

void loop() 
{
  if (digitalRead(buttonApin) == LOW)
  {
    lcd.setCursor(0, 1);
    lcd.print("Test");
  } 


  lcd.setCursor(0, 1);

lcd.print("launch in ");  
lcd.print(millis()/1000);


user368: Either clear the display first, or print enough spaces after to overwrite the existing text.

user470: The HD44780 controller has a 80 bytes (characters) memory, in order to support up to 2x40 character displays. Since you use a 2x16 display, there is an empty space in the memory you can use on your benefit. It's like having two desktops, you are able to show one or the other.
Refer to LCD Addressing for a visualization of the the memory locations and detailed explanation.

Anything you write in locations setCursor(16, 0) to setCursor(39, 0) and setCursor(16, 1) to setCursor(39, 1) will not be visible until you scroll to the left. Consequently you can have some text already written in the hidden area and then alternate the shown text just by scrolling left and right.
Here is an example
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);

int buttonApin = 4;

void setup() {
   // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);  
}

void loop() 
{
  if (digitalRead(buttonApin) == LOW)
  {
    // write text to the visible area
    lcd.setCursor(0, 0);
    lcd.print("showing 0,0-15,0");
    lcd.setCursor(0, 1);
    lcd.print("showing 1,0-15,1");

    // write text to the hidden area
    lcd.setCursor(16, 0);
    lcd.print("now  16,0-31,0");
    lcd.setCursor(16, 1);
    lcd.print("now  16,1-31,1");

    while (1) {  // scroll to the left and back to show different text without writing a single character
    delay(2000);
    for(uint8_t i=0;i<16;i++) lcd.scrollDisplayLeft();
    delay(2000);
    for(uint8_t i=0;i<16;i++) lcd.scrollDisplayRight();
    }

  } 

}

The code changes the visible text just by scrolling

3454: <p>My code means that when i press a button it displays a word, but by default words are already there and i need to get rid of those default words.</p>

<pre><code>#include &lt;LiquidCrystal.h&gt;

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);

int buttonApin = 4;

void setup() {
 pinMode(buttonApin, INPUT_PULLUP);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Mission Control ");
}

void loop() 
{
  if (digitalRead(buttonApin) == LOW)
  {
    lcd.setCursor(0, 1);
    lcd.print("Test");
  } 


  lcd.setCursor(0, 1);

lcd.print("launch in ");  
lcd.print(millis()/1000);
</code></pre>
 368: <p>Either clear the display first, or print enough spaces after to overwrite the existing text.</p>
 470: <p>The HD44780 controller has a 80 bytes (characters) memory, in order to support up to 2x40 character displays. Since you use a 2x16 display, there is an empty space in the memory you can use on your benefit. It's like having two desktops, you are able to show one or the other.</p>

<p>Refer to <a href="http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html" rel="nofollow noreferrer">LCD Addressing</a> for a visualization of the the memory locations and detailed explanation.</p>

<p><img src="https://i.stack.imgur.com/a9SV4.gif" alt="enter image description here"></p>

<p>Anything you write in locations <code>setCursor(16, 0)</code> to <code>setCursor(39, 0)</code> and <code>setCursor(16, 1)</code> to <code>setCursor(39, 1)</code> will not be visible until you scroll to the left. Consequently you can have some text already written in the hidden area and then alternate the shown text just by scrolling left and right.</p>

<p>Here is an example</p>

<pre><code>#include &lt;LiquidCrystal.h&gt;

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);

int buttonApin = 4;

void setup() {
   // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);  
}

void loop() 
{
  if (digitalRead(buttonApin) == LOW)
  {
    // write text to the visible area
    lcd.setCursor(0, 0);
    lcd.print("showing 0,0-15,0");
    lcd.setCursor(0, 1);
    lcd.print("showing 1,0-15,1");

    // write text to the hidden area
    lcd.setCursor(16, 0);
    lcd.print("now  16,0-31,0");
    lcd.setCursor(16, 1);
    lcd.print("now  16,1-31,1");

    while (1) {  // scroll to the left and back to show different text without writing a single character
    delay(2000);
    for(uint8_t i=0;i&lt;16;i++) lcd.scrollDisplayLeft();
    delay(2000);
    for(uint8_t i=0;i&lt;16;i++) lcd.scrollDisplayRight();
    }

  } 

}
</code></pre>

<p>The code changes the visible text just by scrolling</p>
