Staying in pocket takes time to develop. Many can get in the pocket, then clinch, takedown or back out, but it's not 'staying' in pocket. Staying in pocket is infighting.
First you have to develop getting in. That means weaves, slips, ducks, or eating punch or kick in worst case scenario. Train those a lot. If you get in pocket easy without specific training, it could be due to your natural talent, good stylistic match up with sparring partner or lack of his/her skills to punish you for trying to get in.
Than comes the hard part, staying there and doing damage. In MMA it means a lot of moves to avoid his attacks. Again train blocking, parrying, bob and weave. For attacks you can use uppercuts, hooks, bodyshots(underestimate in MMA), knees elbows, low kicks even back-fists and back-elbows.
Last is to transition out or get in the clinch/takedown.
It's huge topic. Also your trainer might have a very specific philosophy and strategies regarding infighting. Definitely ask him/her what could you train in your spare time, if he/she don't want to do that with whole class yet.