An octave above a note is 3 lines and it's on the next space up, or 3 spaces, and it's on the next line up.
EDIT this question has been edited so much, my answer appears to be rubbish!
Now, it seems to be asking which particular place to play a particular note!
Pease note that just because tab says play it there doesn't mean tab is telling the best place - in some tabs, it may be the only place the tabber knows!
The choice will always be up to the player. With that quoted A - which I'm taking as A♮, otherwise you wouldn't be playing it as A♭ on the A string. Yes, it could be A string open, it could be 5th fret E string, it could even be 10th fret low B string!
Where you play it is up to several criteria. Where you already are on the fretboard means probably find the closest A (same octave, obviously). That will also influence what comes next - where that might be. An open string often sounds different from a fretted one, so deciding to play open will need that choice to be made with that criterion. Fatter strings sound different from thinner ones, so another choice - what tone do you want? You may play the bottom sting with thumb, and A string with a finger. Again tone can come into the equation.
Bottom line (you're playing bass!) is it's your choice, with regard to all the above criteria. The only way to get there automatically, which is what it will partially become, is to play lots - practise!
Ab
chord, notA
. Note on the 4th fret of the E string is Ab.