Thus if one does what Allah commands and stays away from what he forbids he will achieve Taqwa.  For example:
O you who believe! Fasting is prescribed for you as it was prescribed for those before you, that you may become muttaqoon (those who have Taqwa or piety)."
[ Al-Baqarah 2:183 ]