Hey, I've got a lot of trouble on this one thing..

Determine b & c such that f(x) is continuous

f(x)= { x+1, 1<x<3

x^2+bx+c, x≤1 or x≥3

PS:I found the answer was b=-3 and c=4, but how did they get it?

i have no idea how to do this problem, or any kinds of problems related to this in general.. my teacher really didnt explain the material and i've got a test tomorrow on this.. can you teach me how to learn the concept of this?? I HAVE NO IDEA HOW TO DO THIS!