Patenting an invention means legally claiming the property rights of an invention which has been solely created by the claimer (or claimers). Either this invention is physical or tangible, the grant of ownership is issued to claimer by providing a legal statement that confirms the claimer as only holder of such grant and no one can use, make, copy or sell this invention except the claimer.
When you patent something be it an invention or an idea, it means for a number of years it is legally recoginsed by the government as your idea. You are the only one who can reap the finanical benefits from it.
No one else can come along and copy your invention unless you decide to sell it to them or licence it out.
It's obtaining a grant from the applicable authorized body (depending on which country you're in) which gives the inventor the sole right to make, sell, or use a thing invented by him. Before he can get the grant he must prove that his invention is a really new one and is of some practical use.