It allows you to stop other people from using your invention. In order to obtain a patent, the invention must be described and defined in a document known as the specification. When your patent is granted, the specification becomes a public document - anyone can obtain a copy of it and learn about your invention. If the invention has been published or made public in anyway before the patent is applied for, then the patent right generally cannot be obtained. So, you should apply for a patent before any publication, advertisement, sale, public demonstration or use of the invention occurs.
Patents cover all fields of technology.
Basically, an invention is something which is new and is not obvious. It must be technical, but it does not need to be complicated or high tech. Most inventions are new machines, products or industrial processes. These can generally be patented. Some things, although new, cannot be patented.