On the airport's website, you can find the schedule of buses Linea 9373/A-Linea 9373/R (Alghero-Fertila Aeroporto), which will take you directly to the city. Tickets for these buses can be purchased at special ticket machines in the airport. The purchased ticket will be valid for exactly 90 minutes from the moment it is validated, and it allows you to transfer for free during that time.
The prices for tickets vary depending on the type and number of trips: 1 EUR for a single trip, 10 EUR for a ticket valid for 12 trips, 2.5 EUR for a day pass valid until midnight, and 1.5 EUR if you buy the ticket from the driver.