Looking for simple 2D AABB collision tutorial or code

I have tried to create my own 2D AABB collision for ages but i cannot get it to work correctly it has either flew of the map or clips and clings to the side of blocks. Does anyone have some simple collision with sliding?