For academy training, you need to acquire the Academy upgrade from the mansion upgrade options. As for the Heir training, the child must be of heir status (A child born from or with the spouse/wife/husband, a trait gained via marriage, and the master).
For marriage, on a date with person who will be the other parent of your child ask to marry after having a certain amount of consent. Then go to the church and select marriage option and the person you'd like to marry and birth a heir.