To put up is not exactly staying somewhere, but more like offering some to stay with you. So for example, if I'm offering a friend to stay with me and I can offer him the guest room, I'd say "I could put you up in our guest room". Or if a hotel doesn't have enough rooms for a large group of 50 guests, they could say "We don't know where to put them up".
And don't confuse this phrasal verb with another one (to put up with), which means to accept or tolerate. So for example, if you have a younger sister who always wears your clothes and you don't like that, but you have to accept/ tolerate it, then you could say "I have to put up with my sister wearing my clothes".