What is [Setup] purposes in Robot Framework? Is it a built in keywords or we can extend it?
The setup and teardown statements in a test ([Setup] and [Teardown], or the setup and teardown options in the settings table) are themselves not keywords, though they are used in a similar manner. They take a keyword as their first argument, and that keyword is run before the body of the test ([Setup]) or after the body of the test has finished running ([Teardown]). The keyword you provide can do anything you want, so in that sense you can extend them.
A test typically has four phases (though the second and third can sometimes be intermixed):

setup - prepare the system for test
exercise - perform actions on the system being tested
verify - do verifications on the outcome of the exercise
teardown - free up resources used by the tests

By using [Setup], or the global Suite Setup or Test Setup in the settings section, helps you identify which code is preparing the test and which code is related to the actual test. 
One of the aspects of good test design is that failure should tell you something useful. If a test fails during setup, that is going to tell you something different from failure during the test itself. A failure in the body of the test signals a failure in the product being tested, a failure in the setup or teardown usually means there is a problem with infrastructure or the implementation of the test itself.
As a useful side-effect, using setup and teardown helps to document your test cases. The setup says "this isn't what this test is testing, it's simply preparing the test". The body of the test says "this is what I'm actually testing". And the teardown says "I'm done testing, now it's time to clean up".
Robot Framework: What is [Setup] purposes?