1.) Create an ability with the type learn (Name it w.e you like)
2.) Add the new learning type ability to your hero
3.) Goto the command card on your hero and add a new button with a subcommand ability and in the Learn ability slot put your learning type ability that you just made.
4.) Make a new spell add this spell to your learning type ability through "Info - Ability" also give it a default button.
5.) Edit "Points" and "Points Per Level" in your learning type ability I set them both to 1.
6.) Now go back to your hero add the spell you just made in the first command card wherever you would like.
7.) Now switch to command card 2 or w.e command card you made your learning type ability link to. Then click a slot on the empty command card and add your learning type ability but when you select it select the ability you assigned to it through the ability command input. right below where you input that u put your learning type ability.
8.) To finish it off in the command card 2 or w.e command card you made your learning type ability link to add a button I put a cancel button and give it a submenu command type so you can return to your normal card
Please forgive any vagueness, I did just right this up in a few minutes.
If you have any questions dont be afraid to ask

DD
Oh and almost forgot once you have that all down you are going to want levels for your spells
Adding a level is the simplest thing ever. What I did to figure it out was by adding a second cooldown to my spell which was applied when I learned the spell a second time (which became available as soon as I added a second cooldown) You can edit various stats for each level I think its a bummer that if u want the effect that comes with the spell to level too you have to make a copy it and make changes accordingly and just have 2 effects one for each level.