LR is link register used to hold the return address for a function call.
SP is stack pointer. The stack is generally used to hold “automatic” variables and context/parameters across function calls. Conceptually you can think of the “stack” as a place where you “pile” your data. You keep “stacking” one piece of data over the other and the stack pointer tells you how “high” your “stack” of data is. You can remove data from the “top” of the “stack” and make it shorter.
From the ARM architecture reference:
SP, the Stack Pointer
Register R13 is used as a pointer to the active stack.
In Thumb code, most instructions cannot access SP. The only
instructions that can access SP are those designed to use SP as a
stack pointer. The use of SP for any purpose other than as a stack
pointer is deprecated. Note Using SP for any purpose other than as a
stack pointer is likely to break the requirements of operating
systems, debuggers, and other software systems, causing them to
malfunction.LR, the Link Register
Register R14 is used to store the return address from a subroutine. At
other times, LR can be used for other purposes.When a BL or BLX instruction performs a subroutine call, LR is set to
the subroutine return address. To perform a subroutine return, copy LR
back to the program counter. This is typically done in one of two
ways, after entering the subroutine with a BL or BLX instruction:• Return with a BX LR instruction.
• On subroutine entry, store LR to
the stack with an instruction of the form: PUSH {,LR} and
use a matching instruction to return: POP {,PC} …
This link gives an example of a trivial subroutine.
Here is an example of how registers are saved on the stack prior to a call and then popped back to restore their content.