If you have gotten to the half-guard in BJJ, then you have done something right or let a lot go wrong. Do not panic though, because you still have to finish the fight, or if you are on the bottom, you need to get back to guard or sweep. So, lets look at all the things you can do from each position.
The main thing you need to realize when on top in half-guard is that you are still vulnerable. The person on the bottom is going to give you a lot of trouble while you try to maintain your position. You could move to knee-on-belly or north south if you wanted to, but lets look at what you can do from actual half guard. Most people use half guard as a way to pass to the mount position. To do so you have to have proper control from half-guard first with your knee closest to their head under the arm on that side, your other knee in their hip, and your arm, closest to their head, underneath it putting pressure on their face. Instead of jumping to mount, you will want to go to knee-on-belly and slide your knee across until it hits the mats on the other side. From there you can enter full mount completely.
There are other types of ways to gain mount from half-guard, and you may find one that works better for you. I am fond of the pass I mentioned above since it allows you to maintain full control while transitioning. Half-guard is seen more as a transition position, but there still are a few submissions from here as well. You can go for a straight arm lock, kimura, and lapel choke, but a lot of these leave you open to a sweep. The most common submission is a far-side armbar. Your opponent needs to leave their far arm wrapped around your back, you control it by using your arm closest to their legs and grabbing you own lapel, post up with your leg and turn, and then fall back to finish the armbar. These are simple breakdowns since this article is more about your options than the actual moves.
On bottom in half-guard is a whole different game. There are not really any submissions and your sweeps depend on what your opponent is doing to you. The immediate action is try to get back to half-guard or full guard, but there are many sweeps that do rely more on power. To go back to guard, the easiest way is to work for your under hook, shrimp out, and then try to swing your legs back underneath to reattain guard. If your opponent places his hand in your hip to block you regaining guard, then use your under hook to get to your knees and pull off a double leg takedown. Once again, the half-guard is more for transitions on top and getting back to where you are at less of a disadvantage from the bottom. So, do not go for anything crazy, maintain your position, or work to get back to the guard you lost, because if you go to fast, you are bound to end up somewhere even worse.