It depends on the programming language used. In more high level languages, you can abstract away the details and just implement the queue as a queue of pointers or object references to strings. In that way, every reference use the same space. Now you can look more into how strings of dynamic size can be stored and managed.
If your question really is about how to store the objects on the queue and not just references to them, you can implement the queue in a way such that beside storing each element, it also stores the size of that element. In that way, you can dequeue an element by returning the front element of size x
bytes and move all but the front element x
bytes forward in the queue. You will also have to move the back pointer x
bytes forward.