Short answer, yes you can get better at IQ tests by learning the common patterns and practicing the tests. Some people do so, and reach very high IQ scores. But there is essentially no reward for doing this, and thus almost no one bothers to do it. In the absence of practice, IQ is an empirically relatively stable metric which correlates with a number of other empirical outcomes, about as well as anything in the social sciences ever does.
Technically yes. You could increase your score on IQ tests by practicing them. But there is no point to doing so.
Your general intelligence (also known as -factor) matters. IQ is a good metric for general intelligence. IQ is such a good metric for general intelligence that it is often used as shorthand for -factor. IQ matters because it is a measurement of your general intelligence (-factor). You could increase your score on IQ tests by practicing them but that won't increase your general intelligence. It would just cheat the metric. We treat IQ as a stable, intrinsic characteristic because general intelligence is a stable, intrinsic characteristic.
You should distinguish between "intelligence as a trait of the brain which we are trying to measure" and "the result of using a specific IQ test". Learning the IQ test is like standing on tiptoes when someone measures your height... yes, you will get a higher result, but you didn't actually grow up, you just cheated the test. You can cheat the IQ test and get a higher score e.g. by learning the right answers, but that doesn't increase your intelligence as such.
(And by the way, please do not take online IQ tests, ever. They are practically all scams. Especially those that say they are endorsed by <whatever organization>; they are not.)
Intelligence is not the same as knowledge or skill. As you get older, you naturally get more knowledge, and you get more skills. And the IQ tests adjust for this; they are calibrated for each age group separately, so a 10 years old would get higher IQ than a 20 years old if both answer correctly 15 out of 20 questions.
In practice, IQ is measured by test (because, how else would you measure it?), and you can cheat by specifically preparing for the test. That increases your test score, but not the underlying intelligence. For example, imagine that someone spends years practicing for one IQ test, and then is unexpectedly given a completely different IQ test. This would probably result in their "true IQ" being revealed.
Shortly, you should imagine intelligence as something like "ability to solve new problems". Of course, there is the technical problem that whenever someone designs a test that measures this ability, people can take the test repeatedly or find the questions and answers online, and then the problems are no longer "new" for them. Yes, this is a problem of tests. It does not make the underlying concept of "ability to solve new problems" invalid.
Raven's matrices are only one example of an IQ test. Performance across a wide range of domains, from pattern recognition to sensory discrimination to knowledge to reaction time is correlated. This widespread pattern of correlations is likely due to the performance on these many domains sharing causes, with the broadly shared causes being called g.
Since g affects your performance on tests, IQ tests to an extent measure g. However, as you point out, you can often just practice a test to become better. This practice will only make you better at that specific test, though; training your pattern recognition skill with matrices will not make you better at distinguishing the weights and colors of objects using your senses. That is, practice doesn't change your g, but instead improves the test-specific skills called s.
Your IQ score is a combination of g and s factors (and other factors too). And it doesn't even exist unless you take an IQ test. So it can't be a stable innate characteristic of an individual. But g - that is, whatever underlies performance across wildly different tests - must exist independently of the tests, as a characteristic of the individual, and empirically it appears reasonably stable in adulthood, and highly genetic.
Roughly speaking, the IQ score measures one's ability to recognize patterns, so it isn't a direct measurement of intelligence per se, but of an ability that correlates strongly with several other abilities that people associate with the much fuzzier concept of intelligence.
If you practice for IQ tests, you're going to become better at detecting the specific kinds of patterns used in IQ tests, but then your IQ score will correlate less with your general pattern-recognition ability, and in turn with those other traits, so at some point your score will stop reflecting your general intelligence.
To increase your intelligence as a whole you'd have to become better at recognizing more and more complex patterns in general, and not only for when you're focusing on problems, but on the automatic, as a passive ability. That would require quite a lot of cerebral plasticity, which is something adults almost universally lack.
Now, having a great pattern recognition, and by extension a high IQ score, by itself, doesn't suffice to say someone is actually intelligent in a broad sense, because when one is very good at detecting very hard-to-perceive patterns (hard to perceive for the majority), they also become very good at detecting patterns that aren't there at all. For example, conspiracy theorists -- the kind who creates conspiracy theories, not mere followers -- are usually very high IQ individuals whose pattern-recognition went in quite wrong directions. Hence, a high IQ is, at best, a very raw measure of one's cognitive potential, more than one's cognitive execution. This one does require training to be turned into something actually able to accomplish great things.
Be as it may, there have been some studies on what does increase the average IQ scores for populations at large. The main factor, above everything else, is better nutrition during infancy. That helps the brain to develop without hindrances, resulting in most of those children, when they grow, being able to recognize much more patterns than peers of theirs who were malnourished in their first years. That one factor cannot be compensated for later in life. And on top of that, access to excellent education in a stable environment during one's formative years also helps with a few extra points.
Finally, it should be noted that the effects of IQ scores are better understood (because easier to study) for lower IQs than for higher IQs. For lower IQs there are lots of correlations with anti-social behavior, criminality, impulsiveness, mental illnesses etc. For higher IQs there are correlations with mathematical prowess and having better incomes, probably because we live in a society that values professions requiring pattern recognition (engineering, law, finance, programming, anything requiring complex strategizing etc.), but not much beyond that.
There are three components:
As an European, I did never have any IQ test, nor I know anybody who (to my knowledge) was ever administered an IQ test. I looked at some fac-simile IQ tests on the internet, expecially Raven's matrices.
When I began to read online blogs from the United States, I started to see references to the concept of IQ. I am very confused by the fact that the IQ score seems to be treated as a stable, intrinsic charachteristic of an individual (like the height or the visual acuity).
When you costantly practice some task, you usually become better at that task. I imagine that there exists a finite number of ideas required to solve Raven matrices: even when someone invents new Raven matrices for making new IQ tests, he will do so by remixing the ideas used for previous Raven matrices, because -as Cardano said- "there is practically no new idea which one may bring forward".
The IQ score is the result of an exam, much like school grades. But it is generally understood that school grades are influenced by how much effort you put in the preparation for the exam, by how much your family cares for your grades, and so on. I expect school grades to be fairly correlated to income, or to other mesures of "success".
In a hypothetical society in which all children had to learn chess, and being bad at chess was regarded as a shame, I guess that the ELO chess ratings of 17 year olds would be highly correlated with later achievements. Are IQ tests the only exception to the rule that your grade in an exam is influenced by how much you prepare for that exam? Is there a sense in which IQ is a more "intrinsic" quantity than, for example, the AP exam score, or the ELO chess rating?