Occasionally having foamy urine is normal. It may simply mean that your urine stream is too fast or too forceful, or that your urine is highly concentrated (which can occur when the body is slightly dehydrated).
However, if you frequently have foamy urine and it becomes more noticeable, you should see a doctor. This could be a sign of proteinuria, which means there is a high level of protein in your urine and usually indicates a problem with your kidneys.