Should I cite or quote?
The standard dichotomy of quoting vs. paraphrasing makes sense for prose (where an idea can be expressed in many ways), but generally not for mathematical equations: F = ma cannot be meaningfully paraphrased.  An algorithm straddles the boundary (which is a source of much intellectual property difficulty): in some ways, after all, an algorithm can be thought of as a rather extensive equation.  

A prose-style block quote is not appropriate for an equation, and I would argue that it is likewise not appropriate for an equation.  What I instead tend to do in this circumstance is say something like, "Here is the definition of Algorithm X, as reproduced from [citation]:" and then state the definition.  If I am adjusting notation or making other such presentation changes, then I will replace "reproduced" with "adapted."  This gives the citation and makes it clear that you are using somebody else's formulation, without breaking into a prose-style quote (even better is to place it in a figure or table).

The explanation of the algorithm, on the other hand, is prose, and that you should write yourself, paraphrasing and adapting for the context in which you are discussing the algorithm, which is no doubt different than its original presentation.