You must buy both tickets in 1 transaction and the purchased ticket cannot be purchased with miles.
You'll pay full price (technically a "paid published coach airfare") for the first ticket and enter in your discount code for the companion fare which will ring up as $99 + fees ($118 in your example).
If the regular price is $500, you'll book 2 tickets for $618 (one fare at $500 and companion fare at $118).
Companion Fare Discount Code Q & A
What is the Companion Fare Discount Code that comes with my credit
card?
The Companion Fare Discount Code is offered to holders of the
Alaska Airlines Visa Signature® Card, The Platinum Plus® MasterCard®
and the Visa® Business Card. This Discount Code entitles the
cardholder to purchase one round-trip coach companion fare on Alaska
Airlines from $121 (USD) ($99 base fare plus applicable taxes and fees
from $22 depending on your Alaska Airlines flight itinerary) when
traveling with another passenger on a paid published coach airfare on
the same itinerary, booked at the same time. Mileage cannot be used as
a form of payment, however mileage credit accrual is allowed for both
travelers. Travelers are responsible for all applicable taxes, fees,
surcharges and applicable checked baggage fees. The Companion Fare
Discount Code is not valid with award travel, and cannot be combined
with other discounts.
Source: Alaska Air Companion Fair Q&A