Strength increases damage dealt with normal attacks and physical skills. It works against the opponent's endurance.
Magic increases damage dealt with magical skills. Also works against the opponent's endurance.
Endurance reduces all damage taken.
Agility determines evasion, accuracy, and turn order (aside from boss fights, in which turn order is fixed).
Luck affects critical hit chance, evasion, status ailment resistance and instant death resistance.
For an example of how strength and endurance work, we can look at the damage formula for Persona 4 (
obtained here)
Damage = 5 x sqrt(ST/EN x ATK) x MOD x HITS X RND
DMG = Damage
ST = Character's Strength stat
EN = Enemy's Endurance stat
ATK = Atk value of equipped weapon OR Pwr value of used skill
MOD = Modifier based on the difference between character level and enemy level
HITS= Number of hits (for physical skills)
RND = Randomness factor