Direct recording is pretty straight forward.
Just connect your guitar to a DI (direct box). Your DI can come in all forms and with all types of functions. Some examples with modelling will be what blueprint mentioned. Or you can connect to something without modelling like the DOD 265.
Connect the output of your DI to input of whatever device you intend to use to record. Usually, DI is guitar in and mic level out, therefore, connect to the mic in of your recording device. Some modelling DI is line out, so you can connect to the Line level in of your recording devices.
However, I beg to differ on direct recording being better then miking amps.
If the amp and guitar is set-up correctly with the right mic and miking technics, the sound can be potentially better and more detailed then modelling or DI. Miking amps also provides more flexibility in getting tone and sound exactly how you want it.
Hope thast helps.
Robin