Serious collision problems

I have this overhead game I’m trying to make just to get better at programming. The thing that is killing me is collisions with walls. I got the detecting it and finding which side of the wall was hit. Reacting properly so no glitches occur is killing me. This is a problem that has been killing me for hours and hours of searching and thinking of solutions. I got it to work semi well but when the game would glitch, the framerate would lower, the character would jump right through the wall. When I would add multiple walls and edit their size bad things happen.

This is what I want to be able to do. When the character hits the wall I want him to be put on the outside of the wall and I want him to stop moving in that direction until the the arrow key is brought up(I figured out how to do the arrow key thing). It’s harder than one would think.

I was wondering if you guys could suggest some good books, online tutorials, or anything that can teach me how to do proper and solid collision detection and reaction. I wouldn’t mind so much if it is a book that costs money if it had other useful information or it was worth the money.

Thanks