First, you need to understand wake-up. 'Wake-up' is just a term used to describe getting up from a knockdown. After you are knocked down, you are unable to act for a period of time, but you are also invulnerable during that time. As soon as you are able to act again, you become vulnerable.
Wake-up after being backstabbed is different from wake-up after most knockdowns. The wake-up from a backstab has two phases. The first phase is like a regular wake-up. During the second phase, however, you become vulnerable to normal attacks and your character will automatically rotate 180 degrees. You remain invulnerable to backstabs during the second phase. As soon as you take any action, the second phase ends. Your character will stop turning, and you become vulnerable to backstabs again.
You will also need to understand how performing an instant-tracking move works. Most attacks, spells, and some items in Dark Souls have 'tracking'. That is after you begin to perform one of these actions, let's say an attack, you are given a window of time during that attack where you can adjust your character's facing angle. Instant tracking allows you to do this before the weapon's start-up even occurs, and it causes your character to rotate in whatever direction you want in the space of 1 frame (1/30th of a second).
Instant tracking cannot be performed with spells, blocking, kicks, or the Thrusting/Curved Swords' evasive attacks. It can be performed with almost any other action, including attacks, parries, item usage, etc. To perform any instant-tracking action, press the button to input whatever move you want to do, then immediately press the left analog stick in the direction you want to face. If you do it fast enough, you will face that direction instantly and perform the attack. With an instant-tracking backstep (sometimes called 'ravioli step'), you have to delay the analog input slightly, or you will perform a roll instead.
Performing a wake-up backstab off a non-backstab knockdown is simple in concept and execution. Performing a tickstab is conceptually very similar to a wake-up backstab, except that instead of BS'ing somebody out of their wake-up, you're BS'ing them as soon as their hitstun ends. How difficult or easy it is to execute varies a lot based on your positioning and the duration of your attack's hitstun. Tickstabs can also be performed after your opponent's guard is broken. Performing wake-up backstabs after a backstab (henceforth referred to as chainstabbing) is the least reliable and most complex form of wake-up backstab.
To perform a wake-up backstab, position yourself behind your opponent as gets up. As soon as his wake-up ends, press R1. With practice, you should get the timing down and be able to perform this pretty reliably.
To perform a tickstab, position yourself behind your opponent while he is in hitstun. As soon as his hitstun ends, press R1. Again, how reliable this is will vary with how much hitstun your attack has and how you are positioned. Perhaps the most common form of tickstab is following up Wrath of God, especially dead-angled WoG's.
The simplest method to counter well-performed tick and wake-up backstabs is to roll towards your opponent. This is easy to perform. You just unlock, push your analog stick in their direction, and mash roll. It can be punished very easily if your opponent predicts it, however. To punish a roll like this, your opponent just has to lock on and move forward. If you roll past him, you'll expose your back and he'll BS you.
On less-than-solid tickstab attempts, simply kicking is often a good option. The kick is fast and bypasses poise, so as long as you land it, you're guaranteed not to take backstab damage. You'll either receive a 0-damage backstab, which gives you the security of a two-phase wake-up, or you'll put them into hitstun, allowing you to escape.
Instant tracking actions are a good option against both tick and wake-up backstabs. If your weapon will win trades with your opponent's attack, then just IT (instant-track) attacking can work quite well. You can also try to IT a parry, which will get you a lot of damage if successful. IT backsteps are a bit difficult to execute, but give you some invulnerability against your opponents' attack, hyper armor for a large period of time, and are difficult to punish since they carry you away from your opponent. You won't get a punish on your opponent for doing them, but they are probably the best option for getting out of pressure.
If you are trying to tick or wake-up backstab your opponent and they are using instant-tracking attacks, then you have a couple options. A reliable, though low-reward, move is the dead angle option select (henceforth, DAOS). DAOS works by pressing R1 to attempt a backstab, and then holding back on the analog stick. If you land the backstab, the analog input will do nothing. If you do not land the backstab, you will swing your weapon behind you or to the side, dead angling your opponent. This is good if you suspect your opponent might try to parry or roll past you.
If you are fairly sure that your opponent is going to IT a parry or attack, you can just walk/roll behind them and BS them that way. You can also do this against IT backsteps, but it is a bit harder. You need to sprint straight past them as they backstep, then BS them out of the backstep's recovery.
Chainstabbing is a bit more complicated than this due to its two-phase wake-up. While most of what was said about tick and wake-up backstabs is true of chainstabbing, there's a bit more involved as well.
Because of the second phase in the wake-up after a backstab, your opponent cannot reliably know when they need to press R1 to land a backstab. If they press the light attack button to backstab you during your wake-up, they will instead perform a normal attack. A good strategy for the person getting up is to lock on to their opponent, do nothing, and then roll backwards or to the side on reaction to their attack.
In order to counter this, the person trying to chainstab can kick the instant you enter the second phase of wake-up, and then try to tickstab you out of it. Kicks are fast and bypass poise. While the amount of hitstun from a kick is not normally enough to land a reliable tickstab, kicking somebody from behind will result in them facing away from you while in the hitstun. Note that you need to do this as soon as they enter the second phase of their wake-up, or else they will continue to spin around even after they are stunned by the kick, making them difficult to backstab.
To avoid a kick, roll away as soon as you get up. While this cancels the second phase of your wake-up, leaving you vulnerable to backstabs, you will avoid a kick and be safe as long as your opponent has dedicated themself to performing the kick. Your opponent CAN option select a kick/backstab by performing the kick late, doing the input when the second phase of wake-up begins, but it makes tickstabbing out of the kick very difficult.
Some players will circle around during your second phase, following your back, then try to BS you either as your wake-up ends, or as soon as you perform an action. Against these players, it is USUALLY safe to manually turn your character around. While this leaves them with a fairly large window to backstab you in, it's a small enough window that reacting to your character turning around is difficult. If you don't want to try that, instant-tracking actions are a good choice.
That covers most of the basics of tick/wake-up/chainstabbing.