score:3
As they are separate countries, you will indeed need two visas - one for Canada, and one for the US. You will need to apply for each one separately.
As Algeria is NOT one of the countries eligible for the US Visa Waiver Program, you'll need to apply for a visa in advance - it's not possible for you to get one at the border.
To get a visa, you'll need to fill out an application from the Canadian embassy in Algeria for Canada, and the US Embassy for the United States visa. These quite often take time to process, so try and do it as soon as you know when you're travelling - don't leave them to the last minute!