Welk
Well, first you have to understand how TWRP works, and how to use the file manager in TWRP.
And you have to have a basic understanding of the file system in Android, which is generally the same as in Unix.
The hosts file is usually, but not allways, located at:
System/etc/hosts
All you have to do is find a hosts file you want to change to, download it to somewhere in your device, like to
Download/hosts
Then you boot into TWRP, usually have to mount the system partition, then go to the file manager, and copy your hosts file to the system/etc directory, overwriting the original hosts file.
You can make a copy of the original hosts file if you want, but it is usually basically empty.
Where to find a good Adaways hosts file is another question.
Best is if you can get one generated by Adaway from someone running Adaway.
Adaways basic, "raw" if you like, hosts files are located here:
https://github.com/AdAway/AdAway/wiki/HostsSources
There are quite a few providers of hosts files on GitHub.
DYODD
Keep in mind that TWRP has root access while running, even if your device is not "rooted".
One little mistake and you can create big problems for yourself.