Given enough free time and the services of an instructor, a character can learn a language, pick up proficiency, raise an ability score or learn a feat.

Training in a language or profiency takes 10 work weeks, but reduce this time by a number of work weeks equal to the character’s relevant ability modifier, for tools and languages this ability is Intelligence (a penalty in the ability score doesn’t increase the time needed).
Training a Ability Score takes 30 weeks of time, this cannot be reduced*.
Training in a feat takes 60 weeks of time, this also cannot be reduced*.
Training in a feat costs 100 gp per work week.
*At the end of each week roll a d20, if you roll a natural 20, you make an additional week worth of progress.

Complications that arise while training typically involve the teacher.
There is a 10% chance you will encounter a complication.

d6Training Complications
1Your instructor disappears, forcing you to spend a workweek finding a new one
2Your teacher instructs you in rare, archaic methods, which draw comment from others
3Your teacher is a spy sent to learn your plans for the near future
4 Your teacher is a wanted criminal.
5 Your teacher is a cruel taskmaster.
6 Your teacher comes to you asking for help dealing with some threat

Image –