Most foreigners require a visa to enter Algeria. This must be obtained at an Algerian embassy or consulate prior to entry. No visas are issued upon entry.
First, enquire at the Algerian embassy or consulate in your home country about current arrangement for getting a visa. In some countries the Algerian consulate will have a website on which you fill in and then print off your visa application before taking it to the consulate.
Do start your visa application in good time, well before you want to travel. It may not be a rapid process.
Supporting documentation for visa applications seems to vary slightly from one consulate to another. However all visitors travelling on their own will need to produce a certificat d'herbergement or proof of hotel reservation, stating where they will be staying during their visit. You may be able to obtain this direct from a top end hotel; or via a travel agent or hotel booking website. If you are staying at a friend's or relative's place, then they must give you the certificat d'hebergement which basically is a letter stating that you've been invited to stay with them and that the local authorities have endorsed it.
This means that that travelling on your own in Algeria may not be straightforward because of the difficulty in getting an entry visa. Be reminded that many hotels in Algeria do not have website and do not speak English which makes it all the harder to get the certificat d'herbegement direct.
One way of simplifying the visa arrangements is for travellers to book a local tour with a local operator who will then issue you a letter of invitation for your visa application. This is the simplest and least hassle: bear in mind that French is only spoken in major cities, Algiers and Oran. Elsewhere, it is the local Arabic which is very different from classical Arabic.
However it is also feasible to plan your own tour using hotels picked from a hotel booking website and obtain reservation details that way for including with your visa application.
If you're coming in on business, then the receiving party should arrange all the necessary documents for you to get a visa.
The Algerian Morrocan land border is closed at this point; Crossing on land from Mali, Mauritania, Niger and Libya is highly unadvisable due to terrorist activities there. Best to fly in or take a ferry from Spain or Marseille.
It is best to check up to date information from your nearest Algerian consulate or embassy on entry requirements.