What is patent and how is it obtained?

What is patent and how is it obtained?