His father was killed in a rebellion when he was fifteen, and he did penance each Lent for the rest of life as he felt indirectly responsible.
An effective ruler and rather intellectual (he performed some surgery), he initially supported Perkin Warbeck, a male model who was a pretender to the English throne, before realising peace with his southern neighbour was better.
When the Italian Wars broke out, Scotland had conflicting treaty obligations to both France and England. James eventually chose to support France and, taking advantage of Henry VIII's absence, invaded England.
It didn't go well, he and much of the Scottish nobility were crushed at the Battle of Flodden Field. His big weakness was some rather old-school tactics, such as informing your enemy of your invasion several months in advance and fighting on the front line along with his men plus the ever deadly English Longbows. He was the last British monarch to die in a war.