Usually, you will need to attack enemies on the last hit to get gold an experience points that will lead you to level up your hero in which you can also add skills
Meanwhile, you will be able to increase your survival chances in early battle by sending your creeps in attacking enemies first
So attacks them first, as once a creep has taken the first hit, you can start fighting an enemy and he will never attack you until your creep dies in that area.
If a creep dies and the enemy turns to you, you have to run away until another creep or hero starts coming to fight against the enemy.
Enemy heroes will always choose to attack you when they can so it will be better to avoid getting caught by them
After going through some battles, you will gain experience, level up
Therefore, you must buy better gear to become stronger then start to push through the enemy ranks.
Remember to work together with the other heroes on your team to take out the protective towers.
And when battling towers, creeps, and heroes at the enemy ranks, the enemy heroes will also try to break through your ranks.
Type -allvision or -normalvision to toggle fog of war, allvision enables player to see both factions, normalvision allows players to see their team
Type -createhero name or -createhero name enemy to create hero in game as friend or enemy depending on which code is used based on the name give from the list of heroes
And you can find the hero/npc codes in %STEAM LOCATION%\SteamApps\common\dota 2 beta\dota\itembuilds that contains a default setup and name for every hero.
Type -disablecreepspawn or -enablecreepspawn to disable or enable creep spawning
Type -dumpbots to display the status of all heroes and bots in the current game
Type -givebots name to give bots items based on names of items listed below
Type -gold to receive amount of number of gold to be used in shop
Type -item name to give player the named item based on the list of item names below
Type -killcreeps to kill all creeps currently on map
Type -killwards to destroy all wards
Type -levelbots x to allow bots to gain x number of levels
Type -lvlup x is your hero advances x levels
Type -refresh will give player full heatlh and mana as well as restoring all abilities on cooldown
Type -respawn to respawn player at fountain immediately if killed
Type -spawncreeps to spawn new creeps immediately
Type -spawnneutrals to spawn a neutral camp immediately
Type -spawnrune to spawn randomly a rune at one of the two rune locations
Type -startgame to set the countdown game start timer to 0:00 and starts creeps spawning
Type -wtf or -unwtf to toggle on or off abilities having zero mana cost and no cooldown
Along the game, it would be better to try different heroes, different ways of playing, and different items, to ultimately find a style that fits you best.
Furthermore, playing with friends will give you advantage to win the battle
On the other side, try to balance your team so that you can put a campaign together and communicate with your team-mates during the play