The most common mistake people usually make (including myself) in the beginning is that they think its easier to take care of a smaller tank then it is a bigger tank. It's actually the other way around, the more water you got, the more forgiving it is when something goes wrong.
A good "starter" tank is a 29 gallon.
Then you want to choose your filter/ media. HOB (hang on back), canister, undergravel are most popular, or if you really want to customize it you can buy/build a sump. Again, in the beginning people tend to get intimidated by sumps but they can be real easy to set up. And it adds more water volume to your tank, big plus. Then you have to add media to your filter so the beneficial bacteria have something to live on. Most popular are bio balls and ceramic rings. Bust most filters already come with media. Depending on what you want to stock you may or may not need a heater. Do your research before buying one, last thing you want is to turn your tank into a hot tub. And if you would like to add live plants to your tank you want a good lighting and substrate. Substrate could be just sand, that's what you most commonly see, but root tabs are highly recommended along with fert dosing.
Again, might sound like a lot, but you can make it as simple or as complicated as you'd like.
For salt water tanks its more or less the same thing, you just gotta do your research, and there's plenty of info here and all over the net. If you're a visual kinda guy/gal, YouTube has pretty much every question you might have covered.