It'll become pretty clear to you whether or not the dog is housetrained. While you are figuring this out, make sure to take the dog out right after eating and wait until they go. If they do, say “Good dog!” in a very happy, high-pitched voice, and give them a treat. If the dog stands near the door leading to the outside, then get up and take them out immediately. Make sure to praise them for going to the bathroom outside. If the dog doesn't stand next to the door, just make sure to take them out every 4 hours or so.
If the dog goes in the house and you see it, act displeased (not angry) and take them outside. If they continue outside, then praise. If they go in the house and you didn't see them do it, then don't do anything to the dog. Just clean it up and spray it with urine removal stuff made for dogs.
One slightly hilarious thing I hear about is owners taking their unhousetrained dogs outside, taking them in because they didn't go, and then seeing the dog go in the house the second they get in. In this situation, say “No!” and put them right back outside. Then praise them. (If the dog is on the larger side, then having a collar on will help you get them outside. Just make sure you don't choke them while dragging them outside.)
How long it takes depends on the dog. Some dogs will learn in a week or two, and some might take a month to learn. Just be consistent and don't give up on them.