I've done this, and it's a good option if you're not too far from the TV transmitter sites.
1. You need to devise a secure mount in the attic for a short mast. It's easy if the attic/loft has a solid floor. Mine did not, so I made a custom platform that attached to the top of 2 ceiling joists.
2. You need to ensure that you can physically get the aerial up there, through whatever ceiling opening provides access. In my case, it came with its elements folded back. Once I got it into the attic and ready to mount to the mast, I unfolded the elements to their fixed position. They snap into place.
3. Attach the aerial to the mast and point it in the general direction of the local TV transmitter site. See the last step below re finding the right direction. Leave the hardware a little loose so you can turn the aerial later.
4. You now need to route RG-6 coaxial cable down through a wall to the location where you'll have a wall outlet for the aerial. Start in the attic with the cable connected to the antenna. You then need to drill through a horizontal plate (wood structure at the top of an internal wall), then fish the cable through the wall to a hole you've cut for the outlet. If that sounds like too much work, you can just pass the cable through the ceiling in any convenient manner and decide what, if anything, you want to do about the exposed cable coming down the wall.
5. Pointing the aerial: you have two options, and this is the more complex one. If your local TV transmitters are all pretty much in the same direction, do this with a helper -- position yourself at the aerial with your helper in front of the TV. The two of you need to have communication, like with a pair of cell phones. Have the helper watch the TV (preferably at the signal strength indicator included in the menu of most modern sets) while you turn the aerial in small increments. Tighten the hardware when the signal strength is at maximum.
The easier option, and this is what I did: if your local TV transmitters are in different directions, include a rotor with your installation. You run the control cable at the same time as the coaxial cable. That way you can adjust for the best picture yourself while in front of the TV.