It's almost always the case that when you pay with card, a machine will be brought over to your table or you'll have to go behind the counter to pay. You should also make sure to check the bill before you pay, Spanish restaurants are notorious for inaccuracy when it comes to charging.