What is wrong with it?
If its something manfacturer can warranty then bring it into the carrier you bought it from or in case you
bought from apple send it to them, call them and get a ticket number and so forth.
If you just want something cause its still good and warranty is almost up well just remember if you do get one it will be a refurb phone and only under warranty till your original warranty is up.