If is just as Nate said above along the lines of "you have been kicked from the game" by itself then it is most likely that your ping is exceeding out limit which results in a kick. If it says something else and has numbers and a name, for example: "1.2 - JimmyBobson" then you have been banned and need to make an appeal. https://www.roleplay.co.uk/guide/support/unban-appeal/
Otherwise for ping issues we cannot do much for you other than potentially suggest advise in certain cases. If you are using wifi to connect your PC to your router it would be a better idea to try and get a wired connection instead through cable or a powerline adaptor.