If I get hit by an arrow, javelin, throwing axe or something similar, does it stay sticking out of me? Can I take it out and use it? Can a close enemy take it out and use it?
You will have to make a house rule to determine this, as its not in the rules as written.
For weapons with the ammunition property, like arrows, there is a rule you could use as a guideline.
PHB. Page 146: At the end of the battle, you can recover half your expended ammunition by taking a minute to search the battlefield.
You could determine that this means that 50% of missiles are sticking out of enemies bodies, or fell to the ground nearby. The rest were lost or broken for one reason or another. An arrow hitting a tree will most likely break.
Weapons with the thrown property are different. The DM is responsible for determining what happens when this weapon damages you, or indeed misses; ask where it lands and whether you can reach it.
Regarding whether or not the weapon is literally sticking out of you, the DM could rely on the amount of damage dealt. If a javelin does 1 damage in total, you could say that it pokes through your armour but does not penetrate more than an inch, then falls to the ground.
If the javelin was thrown with +4 to its damage, and a 6 is rolled, you could instead say that it is in fact, stuck in you.
You could instead get some gloves of missile snaring, or be a monk, and just snatch the missile out of the air.
If I get hit by an arrow, javelin, throwing axe or something similar, does it stay sticking out of me?
"Getting hit" is an ingame term for attacker success. It does not mean the weapon hit you in the narrative of the story and is now sticking out of your bleeding wound.
The player handbook says:
Hit points represent a combination of physical and mental durability, the will to live and luck.
It also says under "describing the effects of damage"
When your current hit point total is half or more of your hit point maximum, you typically show no signs of injury. When you drop below half your hit point maximum, you show signs of wear, such as cuts and bruises. An attack that reduces you to 0 hit points strikes you directly, leaving a bleeding injury.
Lets just take a look at a popular movie, "Die Hard". The cop at the end is close to zero hitpoints in D&D terms. He is sweating, battered and bruised, bleeding, has lost his shoes and in a state of despair. He is not riddled by bullet holes. That would be ridiculous, right? Nobody would watch a movie where the hero gets hit by bullets 20 times and is still walking.
So what does your hitpoint pool represent? It does represent the ability to escape the next attack, although the enemy would not have missed if you stood still. You may bring your shield up or dodge or get out of harms way in other ways, but not without cost. You get bruised, get your air knocked out of you, get scratches maybe strain something. "Getting hit" means the enemy made a move that brought you closer to giving up, either voluntarily or by collapsing. It does not mean the enemies weapon is sticking out of your forehead.
This reasoning is why you can recover your hitpoints at a rest. Because you catch your breath, put your arm into a cold stream on so the swelling goes back, put your shoes back on and get back into a ready state. You don't pull out the axe and watch the wound close. You are a hero, but not a troll with supernatural regenerative abilities.
As for picking up throwing weapons that hit or missed you, there have been rules for it in earlier editions. You could pick them up but there was a chance the weapon or projectile was broken. I could not find a rule for this one in D&D 5s index, but as we have always house ruled this through all editions, I have not really looked at all possible books to find it in 5e. Maybe someone else can shed some light.