How to go from 12VAC to a micro USB cable
Since you are starting with AC the first thing is to rectify it into DC.  A bridge rectifier is good for that.  Now that you have DC (albeit lumpy), you will want to add some bulk capacitance (to remove the lumps). Then finally use a DC-DC converter to convert the 17Vdc into 5vdc.  WAIT, WHAT?  17Vdc?

The answer is purposely kept high level and general to encourage learning and discovery on your own.  Also how 12Vac becomes 17Vdc is an exercise for the student.