The first thing I would check is that your internet is working, even if it is there may be many devices using it that will slow it down, attempt to shut down those devices. Secondly this happened to me a couple times so I believe you should restart your computer, sometimes when computers have not been restarted in a while they lag and glitch. I hope you are able to get on the server and play some minecraft