Well... If you guys haven't noticed yet, the OP is more or less clueless in programming - why do you start throwing all the unnecessary stuff at him?
To answer the OP, think of a function as a mathematical function machine:
Now take a function in C++:
The input of the machine thus are two integers: i and j, both of them being integers.
The machine will do something - here it's probably:
However, you need to specify beforehand what comes out of the machine. In this case, you set the type of the output as an integer. Why do you need this?
Because in case of a more complicated function that's not even written by you, you won't know what's inside the machine. It may return an integer, or maybe a vector? The point is, to use such a function, you need to know what you'll receive when calling it.
Now after this,
void means that there is no output. You just call the function, give it some input values; it does something with it, and that's it. That something might be updating a database or uploading data, or maybe just increasing your input values.
Now having said this, there are functions where you have to use what you're told: i.e. Main() should always return an integer.