How easy was it to cross a border in medieval Europe?

by tijostark

My main focus in this question is the border between Portugal and Spain (or it's smaller kingdoms) between XII and XVI centuries, but I guess it should be similar to any other border in Europe... I am wondering what crossing a border looked like? Were there permanent guards/armies checking the borders on the main roads? If so, would they question the people trying to cross what was their business to go to the other side of the border? Or there was no control at all? How did it work overall? Thanks in advance.

WelfOnTheShelf