How do you earn XP in star stable?

For your character, you can earn XP by doing daily quests. For your horse, you can earn XP by doing races.