The cheapest machine is the Mac Mini. It will need to run XCode 6 (the latest is version is 6.3) You also will need an iOS device to test on.
They are about $500 new, but there are plenty of second hand ones around. http://store.apple.com/us/buy-mac/mac-mini
There is another way, using a virtual machine, but it's more complicated and slower than the real thing.
This course, section 2 shows you how to do it. https://www.udemy.com/complete-ios-developer-course
It's not following Apple's terms and conditions, so keep that in mind, but it works for uploading apps.