"I'm getting caught in collision detection and how to make a character jump and how to make a character walk up a slope or steps..."
Why do you want to write it yourself? You could (if you want simple 2d graphics) use an existing framework for platformers and save a lot of time and energy.
How to make characters walk up and down a slope or a stairway entirely depends on how you model this slope and or stairway in the code. :) It also depends on the kinds of physics you would like to involve, is the steep slope, slippery? I think these questions could all find answer, however it would be simpler to ask them one at a time and have some base code to start with.
I will start by answering the question about collision detection. This is implemented in a lot of existing frameworks.
If you are using a 2d-array to represent a tilemap, you can handle collision between the character and the wall this way:
Assuming the character starts in a collision free area and her feet are positioned in (x,y), you check which tile that is:
tilePos.x = character.x / TILE_WIDTH;
tilePos.y = character.y / TILE_HEIGHT;
If the character is less wide than one tile and is positioned around the center of the current tile, you simply check if there is a tile directly underneath it.
//Tile exists is a function that looks at the 2d-array that represents the tile map
//and checks if a floor tile exists in (int x, int y)
onGround = tileExists(tilePos.x, tilePos.y - 1);
//if the character is not positioned in the center of the tile, you'd have to check
//tileExists(tilePos.x +/- 1, tilePos.y - 1); depending on where it is leaning to.
//This is also true if the character is too wide to stand on a single tile.
if there is no tile, the character begins to fall..
character.speed.y -= GRAVITY; //a constant you could define
//Checking if a character can move left or right is just the same
movementDirection = 1 * isRightKeyPressed() - 1 * isLeftKeyPressed();
//Assuming the character is two tiles high
canMove = !tileExists(tilePos.x + movementDirection, tilePos.y) && !tileExists(tilePos.x + movementDirection, tilePos.y + 1);
now jumping is made simple:
if(isUpKeyPressed() && onGround) character.speed.y += jumpSpeed();
This is psuedo code and it needs some refining.. It should give you an idea.
If you never made a platformer, I suggest you learn about states too.