The types of targets that Vikings raided in the 10th century varied considerably, both within a particular kingdom or locality, and between different kingdoms and localities. A monastery in, for instance, the Carolingian Empire in Continental Europe would be different from a monastery in Ireland (Ireland didn't have any thing like villages in the 10th century - people lived in self-sufficient family farms).
The answer to the question of whether or not a village could defend itself against an attack by Vikings depends on a great many variables. Contrary to the popular notion that the Vikings were exceptionally effective warriors, they were actually no better than any other non-Viking warriors in the early Middle Ages. What made the Vikings so effective was their exploitation of the element of surprise. Their ships would appear without warning on the horizon (or even closer to shore) and before anyone on shore knew it, they were descending on a settlement, killing and looting.
I confess that I don't know if settlements organized any form of lookouts to spot Viking ships before they landed. One would think this would be an obvious measure to rob the Vikings of their greatest advantage. On the other hand, the Vikings weren't stupid and could simply land far enough away from a target that their ships wouldn't have been seen approaching, even by lookouts, but close enough that the distance between their landing site and their intended target could be covered in a short time (in which case they would still have the advantage of the element of surprise).
As a general rule, the closest most Early-Medieval kingdoms in Europe had to 'Professional' fighting men, that is, men whose primary purpose in life was to engage in warfare - and, thus, were trained and equipped for this occupation - were the nobility. These were men from families that were wealthy, invariably measured in terms of the amount of land they owned. Members of such families didn't engage in manual labor; other peoples worked for them, in particular peasants of different ranks who rented plots of farmland from these 'land lords', producing the crops that were the chief commodity of Early-Medieval Europe.
Non-nobles such as peasants, the folks who lived in villages that might be targeted by Vikings, had varying degrees of experience with serving in a kingdom's armies. Again, as a general rule, a king and his local officials had the right to call up non-nobles for temporary military service. However, just because they had a legal right to do so doesn't mean that it was frequently availed of. In contrast to the nobility, most peasants had little to no military training and, again according to most legal codes, were only required to possess the minimum of arms - usually this was either a spear or a bow, and a shield. Small wonder that having such men in the ranks of an army, particularly when engaging in a battle, could be as much of a liability as an asset. Significantly, the legal codes usually allowed a king to call up non-nobles for either service in an army or for military-related construction projects, such as building or repairing fortifications and bridges, a duty that would be far more suitable for peasants to perform.
So, the answer to your question is that, while the people in a 10th century village, given enough warning, could have attempted to defend their community with the weapons they were legally required to own, and at least some of these people may have had some military experience (though not necessarily experience of combat), their chances of defeating a raiding party of Vikings was slim to none. Their best option, again assuming they were warned in enough time, was to literally 'Head to the Hills', that is, flee into the countryside, preferably to a location that was both difficult of access and an effective place to hide.