Staying alert and using your common sense will keep you away from harm. You should evaluate all situations before you act, and when you do act, act diligently. Spain is a country where you can easily access the police forces at work so all your queries will be handled quite easily.
In most places, thieves never like a direct confrontation and so it is quite unlikely that you will be hurt in any way if somebody steals from you. It is however important that you be careful all the time.
In some instances, there are thieves who love to steal using motorbikes. In most cases, they target women who carry handbags. They drive by and grab the purses and then speed off. For ladies, keep your handbags close to you even if you are walking on an empty street. If you have money in your purse or wallet, try not to show it at all. You may be an easy target when people realize that you are walking around with cash.
If you are in crowded place, the touristy areas, train, and bus or even in a meeting, keep watch of your things. In most airports and train/bus stations, a voice constantly reminds you of this. It will save you a lot of trouble when you do watch your things.
If you do not need large sums of money, do not carry it. If you can, use a credit card as often as possible as it is an easier way of making purchases without having to carry money. Spain has many cash points and you will also find that many restaurants and shops readily accept credit cards.
Pickpockets are common in all areas especially where they are crowded. If someone steals from you and you realize it, always raise an alarm. In most cases, people will come to help you catch the thief or reclaim things stolen from you. What you should know is that the touristy areas are more prone to thieves than other areas as tourists are easy target. Exercise extra caution at such places.