A 'tackle' is just a challenge for the ball. Most upper body contact is legal in soccer as long as it doesn't involve the arms (shoving, grabbing). A "great tackle" is one where the defender manages to knock the ball away without fouling the offensive player. Fouls are like holding in football in that they can be called on almost every play, so there is a lot of discretion on the part of the ref as to how tight they want to call it.
In general: Getting the ball first -- even if your momentum carries you into the player -- and coming from in front of the attacker will result in a no call. Missing the ball while getting the player and/or coming in from behind or extremely violently or out of control, will get you a foul and/or a card if it is egregious. Often there's a lot of drama on the part of the fouled trying to draw the harsher penalties.
The exception to this is a concept called 'advantage', meaning that if you are fouled, but your team still possesses the ball and is in an attacking position, the ref will say, "Play on" rather that stop play that may be leading to goal opportunity for the fouled player's team.