"Getting stuck" happens when you're trying to figure out something difficult, like a math problem or repairs for a machine.
You use this phrase like this:
I was trying to do the Sunday crossword puzzle, but I got stuck.
You can also specify what part you got stuck on.
A: Were you able to figure out the homework?
B: I did most of it, but I got stuck on question 15.