Hi, Ruby is typically used in the Back End.
Now, for the Back End, that is where all the actual data is. Usually you have a database holding all the data for a website. That could be SQL or a NoSQL database like MongoDB. To communicate with that database in the server, you have the back end. In recent years, Ruby on Rails has become a popular technology for the back end (also called server-side). That is where you will typically be using Ruby.
So when you access a website, you get all the layout and stuff. That is the client side. But when you need data from the server -- the backend, you typically use AJAX to retrieve that data without reloading the whole webpage. So you, the client, would request some information from the server. The availability of that information is made possible after you have programmed the backend to deal with all these requests. Basically, you program in Ruby to determine what data to retrieve and what data to send back to the client. There is a lot going on about accessing/adding/removing data from a database in the backend. That is where you will be using Ruby: to connect to a database and perform some action based on what was requested from the client. Then, that information would be sent back according to your instructions -- whatever you programmed the server to do.
I hope that helps. There is a lot going on in a web application.