To gift a sub, click on "Gift a Sub" on another user's profile. The button will show if you are logged in and the account your are viewing does not have an active subscription.
You can see and manage the people you have gifted subs for here.
You can see if your subscription is being paid for by another player here.
Alternatively, you can purchase a code for a friend here: