This is a guide to achieving durable total concealment in combat. Durable in this case means that the concealment does not end or degrade the moment you attack your opponent.
This guide is derived from a comment I made back on Reddit years ago, but I believe it would be appreciated here. I made the comment to answer a question about sneak attacking at range, and so it is mostly written from that perspective, but I have made some slight alterations to post it here and it could also be useful for other purposes.
Categories
There are four practical ways to become concealed from an opponent in combat in such a way as it will not wear off the moment you make an attack. They are as follows: Blind your target, utilise darkness, utilise obscuring conditions such as fog or smoke, or finally becoming invisible.
Blindness
Several spells can blind your opponents, including the 1st-level spell touch of blindess and the classic glitterdust. As a bonus, convincing a friendly mage to go this route should be pretty easy, since blinding your opponents is a great debuff anyway.
The dirty trick combat manoeuvre can apply blindness for a round. A familiar with the prankster archetype should be able to pull this off, though a friendly melee fighter can also build for it. Greater Dirty Trick is important here to make the blind last more than one round, and Quick Dirty Trick lets them do it in place of one of their normal melee attacks. Unfortunately, it is very difficult to reliably perform dirty tricks at range, so if you prefer to attack at range you will be relying on the melee combatants to do this for you.
Darkness
If your opponent doesn’t have darkvision, but you do, a simple darkness spell (or other way to turn out the lights) will grant you total concealment. This is unreliable since so many of your opponents will likely have darkvision, but the night blindness spell can turn this off.
If you can get the “See in Darkness” ability, you can use deeper darkness to disable regular darkvision, which will work for almost all opponents apart from devils. Ways to get See in Darkness include the advanced rogue talent by the same name, getting a Rod of Shadows, or playing a tiefling and taking Fiend Sight twice.
Wielding a rod of shadows could be tricky. You could use a one-handed weapon or get an extra arm to hold it in. If you fight in melee, you could also use the spellsword spell, which has a good duration.
Obscuring Conditions
Very few creatures can see through effects like obscuring mist, so if you can get some way to see through such effects yourself, you can gain very effective concealment.
If you’re playing an Ifrit, you can take the Firesight racial feat to be able to see through smoke, then find some way to fill the fight with smoke, such as using a smokestick, either on its own or as an alchemical power component for an obscuring mist spell.
Ashen path cast on you will allow you to see through not only magical smoke but also magical fog and mist and similar obscuring effects, while a Goz Mask will work for even nonmagical obscuring conditions.
Obscuring mist is the obvious way to create obscuring conditions here, but you could also get a Saltspray Ring (GM permitting, it is from an Adventure Path) and have as much mist as you want, and it follows you.
Invisibility
A very obvious option is to use greater invisibility, although that only lasts a very short duration.
If you play a ninja, the vanishing trick ninja trick will let you get one sneak attack as a swift action, and later invisible blade will extend it to the whole fight, letting you get full attacks with sneak attack on every hit.
An Amulet of the Blooded can get you Fey bloodline powers as a 9th level sorcerer, including the ability to use greater invisibility for 9 rounds per day. The action to do this is unclear; since it isn’t stated, RAW it’s a standard action, but based on the comparable Illusion Wizard school power, I believe it should be a swift action.