Through Steam, which is the official storefront for the game. Portal has been sold there since 2007 and is frequently discounted to a very low price during seasonal sales, so it is worth watching for a promotion rather than paying full price.
It also appears in bundles. The Orange Box packages Portal with Half-Life 2 and its episodes, and the later Portal 2 has at times been offered with the first game included.
Beyond paid options, Portal has been given away free on a small number of promotional occasions, and those offers were announced on Valve's own channels. Downloading from any other source means an unofficial copy, which carries both legal and security risk.