The mantra is "try to be average, at very low management fees", that way, your performance will always be average, and never worse than average.
As far as I know, the advantages of investing in index funds are global. The idea is that index funds charge less fees. Actively managed funds charge more because they have a team of experts deciding what to buy and sell, but it has been shown that in practice most of them don't manage to significantly beat the indexes, so as the returns are similar, you tend to be better off with lower-fee funds (i.e. index funds).
This is definitely true in Spain, in fact, even truer than elsewhere if you are buying funds from big banks (e.g. the funds offered by Santander, BBVA, etc.) as these typically only want to sell you their own funds and they charge really high fees, higher than in other countries AFAIK.
In fact, if you aren't already doing so, you should look at the fund catalogues of smaller banks and online banks (e.g. I use Self Bank, but there is also Renta4, Tressis, and probably some more). Those offer international funds from management firms other than themselves, and charge smaller fees.
BTW, this is supposed to become less of a problem with a new European directive being passed (MIFID II), which will impose a cap on the fees for distributing funds. Then probably Spanish banks will start offering international funds (BBVA is already preparing for this, I think) with less fees. They're lobbying against it, though, so who knows.
But in any case, index funds will still have cheaper fees than actively-managed funds.
PS: For pension funds ("planes de pensiones"), there are fewer options, as there doesn't seem to be such thing as international pension funds. All the pension funds I've seen in Spain are actively managed and charge too high fees, typically around 1.5% (I still have some due to the tax treatment), if anyone knows alternatives it would be interesting.
Second, there is one thing that the investor can control, and that is fees. Fees eat away at investments over time, so as an investor one should be fighting fees at all times. It just so happens that there are many index funds with extremely low fees.
That said, tax implications matter a ton.
I have some of my savings in index funds. The low fees, the risk profile (if that's a proper term for it in English) and historical performance (which is not a guarantee for future performance) of certain indices is what I like about them.
If I create an index consisting of Company A, B, C, with 40% A, 30% B, 30% C and call that index "the sebcat index" others may sell sebcat index funds consisting of company A, B, and C stocks at those proportions. Of course, that's a bit too arbitrary. Normally you would have an index based on e.g., the N largest companies on a specific market/region. The index may be adjusted over time depending on market cap or something else, funds may not follow the index exactly, but that's the gist of it, to the best of my knowledge (see caveat). It's not in itself bound to geographical regions, though if you buy funds tracking foreign companies you should be aware of currency effects, politics &c (though local companies could be affected by that as well of course).
Look up a couple of indices (e.g., MSCI indices), then find what index funds on your exchange tracks these indices. Look up what the funds consist of exactly. If you compare two different funds tracking the same index, they should have similar performance over time. Buy one or two per index. The fees should be relatively small, 0-0.4%.
If you expect a crash to happen, or you see a crash happening that is not likely to end soon, sell any index funds affected and maybe put the money in interest funds, or gold, or something that you believe will not be as affected by, or benefit from the current situation on the market. Then buy back when (or if) the market goes up again (depending on your time frame).