Attacks and reactions are subcategories of actions. In Dominion, your usual gameplay is competitive PvE, playing alongside each other but not directly against each other. Attacks are your PvP, directly harming each other, and reactions are your defense against attacks.
The attack in the recommended starting set is the most harmless one around: Militia. Militia gives you two coins and forces everyone else to discard down to three cards. For most of the game, having only three cards is a small harm because discarding an Estate or Copper does not hurt much.
You will notice the potentially large difference between “discard two cards” and “discard down to three cards.” In a four-player game, if all three other players play Militia, the second two Militias have no effect on you. Three rounds of “discard two cards” eliminates your entire hand, so your next turn is “buy a Copper or pass.” There are also cards that let other players draw cards; Militia is more valuable after one of those and “discard two cards” is less.
Attacks are how Curses come into play. Curses are a nasty sort of attack: not only are they -1 victory points, they are also useless cards to have in your hand. The presence of an attack that gives Curses makes actions involving discarding and trashing (permanently discarding) more valuable, because you can reasonably expect to have Curses that you will want to get rid of. The supply of Curses is limited like any other card, so there is a limit on how destructive those attacks can be once they are no longer passing out Curses.
Some attacks can change the entire game, and some work better or worse with more players. Militia, for example, is no more threatening with more players. Thief, for example, lets you steal treasures, and you steal more treasures when there are more players. With Thief stealing treasures, Big Money is a much weaker strategy, whereas actions that provide money are worth more. Several attacks target high-value cards, so those games tend to have lower scores, meaner fights, and less chance for one person to run away with the victory.
Reactions are your defenses. Moat is the basic reaction, and it is pretty great: the attack does not affect you; then, when it is your turn, you can play the Moat as an action to draw two cards. That is pretty good, balanced by the fact that something like Smithy would be better if no attack gets played. Reaction cards also tend to be very inexpensive; Moat costs 2. The expansion sets’ reaction cards tend to be more exotic and tied to the mechanics being explored in that set, perhaps letting you discard or trash cards rather than just ignoring the attack.
Attacks add interactivity to the game, something lacking in the base game. Dominion feels more like track & field than fencing; attacks give you swords. For the general working out his mathematically perfect plans, attacks are wild cards, and remember that randomness helps the weaker party. For the player interested in a bit of chaos, attacks can certainly do that. They can also just slow the game down as everyone uses the same attacks and they cancel each other out, or everyone ends up with decks clogged by Curses.
Being more on the general side, I tend to shy from attacks. Taking time to hurt others distracts from my own plans for self-aggrandizement. But they add an entirely different mechanic to the game, and winning a brawl in the dirt can be fun, too.