I would start by getting a crate (you can usually find them on craigslist fairly inexpensive, just make sure that you scrub it out really good and use bleach to try and get rid of any other dog scents). Crate training a puppy is by far the best thing in helping to housebreak it. Always keep the puppy supervised while out of the crate, and even limit its free run in your apartment. I have even gone so far as to attach a puppy to a leash and attach the leash to a belt loop so that it can walk around with me through the house, but I can keep track of where they are and what they are doing. Take the puppy out frequently, give it a command to go potty, and always take it to the same spot to do its business. Also another big thing that has worked for me is to feed on a schedule, at this point don't let the puppy free even if you decide to do so later. Feed the puppy after you yourself eat (this will also help in establishing that you are alpha in the house, never feed your dog first!!). Feeding on a schedule can help you to predict when the puppy will need to go to the potty. And remember feeding treats can cause a puppy to have to potty also, I only add this because some people will overlook that. Always take him out after playtime. And remember to Praise Praise Praise!!! Every time your puppy potties where it is supposed to, always praise him!! And don't punish him for pottying in the house unless you catch him directly in the act. If you catch him in the act use a firm "NO" and then immediately move him to his potty spot outside. If you find he has already pottied somewhere, take him out to his spot, at this point it is too late to punish him for it. And don't clean accidents in front of your dog, this does not help establish you as alpha. I hope I covered everything here, and I hope that this helps you!!