Sati is mindfulness. It's keeping the mind on the task, without wandering.
From SN 47.20:
The Blessed One said, "Suppose, monks, that a large crowd of people
comes thronging together, saying, 'The beauty queen! The beauty
queen!' And suppose that the beauty queen is highly accomplished at
singing & dancing, so that an even greater crowd comes thronging,
saying, 'The beauty queen is singing! The beauty queen is dancing!'
Then a man comes along, desiring life & shrinking from death, desiring
pleasure & abhorring pain. They say to him, 'Now look here, mister.
You must take this bowl filled to the brim with oil and carry it on
your head in between the great crowd & the beauty queen. A man with a
raised sword will follow right behind you, and wherever you spill even
a drop of oil, right there will he cut off your head.' Now what do you
think, monks: Will that man, not paying attention to the bowl of oil,
let himself get distracted outside?"
"I have given you this parable to convey a meaning. The meaning is
this: The bowl filled to the brim with oil stands for mindfulness
immersed in the body. Thus you should train yourselves: 'We will
develop mindfulness immersed in the body. We will pursue it, hand it
the reins and take it as a basis, give it a grounding, steady it,
consolidate it, and undertake it well.' That is how you should train
However, sati is not good enough. There is also samma sati - right mindfulness. Right mindfulness includes right view. Right view is the forerunner of the path according to MN 117.
From MN 117:
"One makes an effort for the abandoning of wrong view & for entering
into right view: This is one's right effort. One is mindful to abandon
wrong view & to enter & remain in right view: This is one's right
mindfulness. Thus these three qualities — right view, right effort, &
right mindfulness — run & circle around right view.
While sati or mindfulness is keeping the mind on the task, manasikara or attention is about directing the mind in the right direction.
Yoniso manasikara is appropriate attention and ayoniso manasikara is inappropriate attention. You can read the question "What is yoniso manasikara and ayoniso manasikara?"
From SN 9.11:
I have heard that on one occasion a certain monk was dwelling among
the Kosalans in a forest thicket. Now at that time, he spent the day's
abiding thinking evil, unskillful thoughts: i.e., thoughts of
sensuality, thoughts of ill will, thoughts of doing harm.
Then the devata inhabiting the forest thicket, feeling sympathy for
the monk, desiring his benefit, desiring to bring him to his senses,
approached him and addressed him with this verse:
From inappropriate attention
you're being chewed by your thoughts.
Relinquishing what's inappropriate,
Keeping your mind on the Teacher,
the Dhamma, the Sangha, your virtues,
you will arrive at
you will put an end
The monk, chastened by the devata, came to his senses.
So, what does this mean? Both are needed - samma sati or right mindfulness, and yoniso manasikara or appropriate attention. However, samma ditthi or right view has to come first. Without right view, every other effort goes the wrong way.
The sniper who aims, shoots and kills another person, may be mindful and have attention, but he doesn't have right view, because a person with right view will stick heedfully (appamada) to the first precept and not kill others, especially another human being.
The sniper who aims, shoots and kills another person, may be mindful and have attention, but it's not right mindfulness and not appropriate attention.