You register online with the CRA.
1. Sign in to your CRA account at canada.ca. If you don't have one, create it first.
2. On the Welcome page, select "+ Add account", then "Business account".
3. Select "Register a business".
4. Accept the disclaimer and follow the steps to register for a GST/HST account.
5. Write down your number. It is 9 digits, then RT, then 4 digits, for example 123456789 RT0001.
You need your social insurance number, and the CRA's online route is for people who have filed a tax return in Canada. If you have never filed one, or can't get a CRA account, the CRA has a paper form instead: Form RC1.
New registrations are done online. If you phone the CRA, they will point you to the same online service.