I mean if, for example, I throw a rock upward, its acceleration will always be $-g$ or it will be $-g+a$ because I apply a force on the object when I throw it? (without considering friction)
Remember that in classical mechanics gravity is a force and not an acceleration.
The acceleration of your rock will be the second derivative of its position in time.
The force acting on your rock will be the sum of gravity and all the other forces that may act on it.
Newton's lav $F=ma$ tells you how to connect force and acceleration, once you know one of the two. You have to remember that $F=ma$ is a principle, not a definition.
You confusion arises from the fact that, due to its particular form, it happens that the acceleration that gravity impresses on objects will be always $g$ (close to the Earth surface) regardless of their mass $m$, if no other forces are present.