For an armbar on your training partner his right arm ...
Put your right foot under his armpit, try to lift the shoulder a bit, make sure you got that side locked with your foot/shin/leg.
Your left leg should be over his face. Then use your left heel/foot the move his head towards you, this will make it bit more uncomfortable for your training partner. Try to touch the heel of your left foot with the toes of your right and keep it locked.
Squeeze your knees together and lift your hip.
If he tries to roll out, keep your knees squeezed together and maintain the foot under his right armpit and the other against his neck and roll with him ...
remember: if his head/neck is already under pressure and he cannot set force on his shoulder / neck, it should be more difficult for him to roll out than it should be for you to keep him on his back.
Goddamn ... wish I could set this explanation in practice right now! ;-)
PS: Hope I was clear on the 'how to' ...